Role.php 748 B

12345678910111213141516171819202122
  1. <?php
  2. namespace app\admin\model;
  3. class Role extends Base
  4. {
  5. //设置字段信息
  6. protected $schema = [
  7. 'id' =>'bigint',//
  8. 'role_name' =>'varchar',//角色名称
  9. 'status' =>'int',//状态:1启用,0禁用
  10. 'role_level' =>'tinyint',//等级:1超管,2业务公司专用,3供应商专用(与账号等级对应)
  11. 'desc' =>'varchar',//描述
  12. 'is_allow_see_price' =>'tinyint',//是否允许查看价格,1允许,0不允许
  13. 'companyNo' =>'varchar',//所属组织
  14. 'addtime' =>'datetime',//
  15. 'updatetime' =>'datetime',//
  16. ];
  17. public function RoleInfo(){
  18. return $this->belongsTo('RoleAction','id','role_id');
  19. }
  20. }