Role.php 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. <?php
  2. namespace frontend\models;
  3. use Yii;
  4. /**
  5. * This is the model class for table "bit_role".
  6. *
  7. * @property integer $id
  8. * @property string $create_date
  9. * @property string $modify_date
  10. * @property string $authority_list_store
  11. * @property string $description
  12. * @property integer $is_system
  13. * @property string $name
  14. */
  15. class Role extends \yii\db\ActiveRecord
  16. {
  17. /**
  18. * @inheritdoc
  19. */
  20. public static function tableName()
  21. {
  22. return 'bit_role';
  23. }
  24. /**
  25. * @inheritdoc
  26. */
  27. public function rules()
  28. {
  29. return [
  30. [['create_date', 'modify_date'], 'safe'],
  31. [['name'], 'required'],
  32. [['authority_list_store', 'description', 'name'], 'string'],
  33. [['is_system'], 'number'],
  34. ];
  35. }
  36. /**
  37. * @inheritdoc
  38. */
  39. public function attributeLabels()
  40. {
  41. return [
  42. 'id' => 'ID',
  43. 'create_date' => '创建日期',
  44. 'modify_date' => '修改日期',
  45. 'authority_list_store' => '权限',
  46. 'description' => '描述',
  47. 'is_system' => '系统内置',
  48. 'name' => '角色名称',
  49. ];
  50. }
  51. }