You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

78 line
2.1 KiB

  1. <?php
  2. namespace common\models;
  3. use yii\db\ActiveRecord;
  4. /**
  5. * This is the model class for table "base_role".
  6. *
  7. * @property integer $ID
  8. * @property integer $ROLE_SYS
  9. * @property integer $MENU_DISPLAY
  10. * @property string $MENU_TITLE
  11. * @property string $ROLE_NAME
  12. * @property integer $PARENT_MENU_ID
  13. * @property string $MENU_ICON
  14. * @property integer $CANCEL_FLAG
  15. * @property integer $CREATE_USER_ID
  16. * @property string $CREATE_TIME
  17. * @property integer $UPDATE_USER_ID
  18. * @property string $UPDATE_TIME
  19. * @property string $TARGET
  20. * @property integer $SEQ
  21. * @property string $NOTE
  22. */
  23. class BaseRole extends ActiveRecord
  24. {
  25. const ROLE_SYS_FO = 1;
  26. const ROLE_SYS_CS = 0;
  27. /**
  28. * @inheritdoc
  29. */
  30. public static function tableName()
  31. {
  32. return 'base_role';
  33. }
  34. /**
  35. * @inheritdoc
  36. */
  37. public function rules()
  38. {
  39. return [
  40. [['ROLE_SYS', 'PARENT_MENU_ID', 'CANCEL_FLAG', 'CREATE_USER_ID', 'UPDATE_USER_ID', 'SEQ', 'MENU_DISPLAY'], 'integer'],
  41. [['MENU_TITLE', 'PARENT_MENU_ID'], 'required'],
  42. [['MENU_TITLE', 'MENU_ICON', 'TARGET'], 'string', 'max' => 255],
  43. [['ROLE_NAME'], 'string', 'max' => 100],
  44. [['CREATE_TIME', 'UPDATE_TIME'], 'string', 'max' => 20],
  45. [['NOTE'], 'string', 'max' => 2048],
  46. ];
  47. }
  48. /**
  49. * @inheritdoc
  50. */
  51. public function attributeLabels()
  52. {
  53. return [
  54. 'ID' => 'ID',
  55. 'ROLE_SYS' => '0:CS菜单,1:车系统菜单',
  56. 'MENU_TITLE' => '菜单名称',
  57. 'ROLE_NAME' => '页面名称',
  58. 'MENU_DISPLAY' => '菜单显示',
  59. 'PARENT_MENU_ID' => '父级菜单',
  60. 'MENU_ICON' => '菜单图标',
  61. 'CANCEL_FLAG' => '已删除',
  62. 'CREATE_USER_ID' => '记录创建用户ID',
  63. 'CREATE_TIME' => '记录创建时间',
  64. 'UPDATE_USER_ID' => '记录最后更新用户ID',
  65. 'UPDATE_TIME' => '记录最后更新时间',
  66. 'TARGET' => '窗口打开方式',
  67. 'SEQ' => '菜单顺序,越小越靠前',
  68. 'NOTE' => '菜单说明',
  69. ];
  70. }
  71. }