OperationLog.php 722 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. <?php
  2. namespace app\admin\model;
  3. use app\common\model\BaseModel;
  4. class OperationLog extends BaseModel
  5. {
  6. /**
  7. * @var string
  8. */
  9. protected $name = 'system_operate_log';
  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. /**
  23. * 关联用户
  24. *
  25. * @author 许祖兴 < zuxing.xu@lettered.cn>
  26. * @date 2020/3/18 10:44
  27. *
  28. * @return \think\model\relation\BelongsTo
  29. */
  30. public function user()
  31. {
  32. return $this->belongsTo('Users','user_id','id');
  33. }
  34. }