Permission.php 802 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. <?php
  2. namespace app\agent\model\auth;
  3. use app\common\model\BaseModel;
  4. class Permission extends BaseModel
  5. {
  6. /**
  7. * @var string
  8. */
  9. protected $name = 'agent_system_permissions';
  10. /**
  11. * @var array
  12. */
  13. protected $insert = ['created_at','updated_at'];
  14. /**
  15. * @var array
  16. */
  17. protected $update = ['updated_at'];
  18. /**
  19. * 模型事件定义
  20. *
  21. * @author 许祖兴 < zuxing.xu@lettered.cn>
  22. * @date 2020/3/26 20:54
  23. *
  24. * @return void
  25. */
  26. public static function init()
  27. {
  28. self::event('before_update', function ($permission) {
  29. });
  30. // 更新之后--更新权限内数据
  31. self::event('after_update', function ($permission) {
  32. });
  33. }
  34. }