Permissions.php 894 B

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