PermissionsRole.php 819 B

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