PermissionRole.php 766 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. <?php
  2. namespace app\agent\controller\auth;
  3. use app\common\model\BaseModel;
  4. class PermissionRole extends BaseModel
  5. {
  6. /**
  7. * @var string
  8. */
  9. protected $name = 'agent_system_permissions_roles';
  10. /**
  11. * @var bool 自模型关闭软删除
  12. */
  13. protected $deleteTime = false;
  14. /**
  15. * @var array
  16. */
  17. protected $type = [
  18. 'role_id' => 'integer',
  19. 'permission_idx' => 'string'
  20. ];
  21. /**
  22. * 模型事件定义
  23. *
  24. * @author 许祖兴 < zuxing.xu@lettered.cn>
  25. * @date 2020/3/26 20:54
  26. *
  27. * @return void
  28. */
  29. public static function init()
  30. {
  31. self::event('before_insert', function ($before) {
  32. });
  33. }
  34. }