AdminGridView.php 980 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. <?php
  2. namespace App\Module\System\Models;
  3. use UCore\ModelCore;
  4. use App\Module\System\Enums\VIEW_TYPE;
  5. /**
  6. * 后台操作日志
  7. *
  8. * Class AdminActionlog
  9. *
  10. * field start
  11. * @property int $id
  12. * @property int $admin_id 操作的Admin ID
  13. * @property \App\Module\System\Enums\VIEW_TYPE $type1
  14. * @property string $title 视图标题
  15. * @property string $router_name 路由名字
  16. * @property array $p1 参数1
  17. * @property \Carbon\Carbon $updated_at
  18. * @property \Carbon\Carbon $created_at
  19. * field end
  20. *
  21. */
  22. class AdminGridView extends ModelCore
  23. {
  24. // attrlist start
  25. protected $fillable = [
  26. 'id',
  27. 'admin_id',
  28. 'type1',
  29. 'title',
  30. 'router_name',
  31. 'p1',
  32. ];
  33. // attrlist end
  34. protected $casts = [
  35. 'p1' => 'array',
  36. 'type1' => VIEW_TYPE::class
  37. ];
  38. public function admin()
  39. {
  40. return $this->hasOne(Administrator::class, 'id', 'admin_id');
  41. }
  42. }