AdminActionlog.php 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. <?php
  2. namespace App\Module\System\Models;
  3. use UCore\ModelCore;
  4. use Illuminate\Database\Eloquent\SoftDeletes;
  5. /**
  6. * 后台操作日志
  7. *
  8. * Class AdminActionlog
  9. *
  10. * field start
  11. * @property int $id
  12. * @property string $type1
  13. * @property string $unid
  14. * @property int $admin_id 操作的Admin ID
  15. * @property string $object_class 操作对象
  16. * @property string $url 网址
  17. * @property array $before 操作之前
  18. * @property array $after 操作之后
  19. * @property int $status 状态
  20. * @property string $p1 参数1
  21. * @property \Carbon\Carbon $updated_at
  22. * @property \Carbon\Carbon $created_at
  23. * field end
  24. *
  25. */
  26. class AdminActionlog extends ModelCore
  27. {
  28. // attrlist start
  29. protected $fillable = [
  30. 'id',
  31. 'type1',
  32. 'unid',
  33. 'admin_id',
  34. 'object_class',
  35. 'url',
  36. 'before',
  37. 'after',
  38. 'status',
  39. 'p1',
  40. ];
  41. // attrlist end
  42. protected $casts = [
  43. 'before' => 'array',
  44. 'after' => 'array'
  45. ];
  46. public function admin()
  47. {
  48. return $this->hasOne(Administrator::class, 'id', 'admin_id');
  49. }
  50. }