AdminUserRole.php 729 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. <?php
  2. /**
  3. * FecShop file.
  4. *
  5. * @link http://www.fecshop.com/
  6. * @copyright Copyright (c) 2016 FecShop Software LLC
  7. * @license http://www.fecshop.com/license/
  8. */
  9. namespace fecadmin\models;
  10. use Yii;
  11. use yii\db\ActiveRecord;
  12. use fec\helpers\CUrl;
  13. /**
  14. * @author Terry Zhao <2358269014@qq.com>
  15. * @since 1.0
  16. */
  17. class AdminUserRole extends ActiveRecord
  18. {
  19. private $_admin_menu;
  20. private $_admin_menu_tree_arr;
  21. public $_ajaxMenuEditUrl;
  22. public static function tableName()
  23. {
  24. return '{{%admin_user_role}}';
  25. }
  26. public function rules()
  27. {
  28. $current_rules = [
  29. ['user_id', 'required'],
  30. ['role_id', 'required'],
  31. ];
  32. return $current_rules;
  33. }
  34. }