Role.php 716 B

1234567891011121314151617181920212223242526
  1. <?php
  2. namespace app\cxinv\model;
  3. class Role extends Base
  4. {
  5. //设置字段信息
  6. protected $schema = [
  7. 'id' =>'bigint',//
  8. 'role_name' =>'varchar',//角色名称
  9. 'status' =>'int',//状态
  10. 'level' =>'varchar',//级别 1/2/3
  11. 'desc' =>'varchar',//描述
  12. 'companyNo' =>'varchar',//业务公司编号
  13. 'addtime' =>'datetime',//
  14. 'updatetime' =>'datetime',//
  15. ];
  16. protected $updateTime='updatetime';
  17. protected $createTime='addtime';
  18. public function RoleInfo(){
  19. return $this->belongsTo('RoleAction','id','role_id');
  20. }
  21. public function ProcessInfo(){
  22. return $this->belongsTo('RoleProcess','id','role_id');
  23. }
  24. }