TimeModel.php 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. <?php
  2. // +----------------------------------------------------------------------
  3. // | EasyAdmin
  4. // +----------------------------------------------------------------------
  5. // | PHP交流群: 763822524
  6. // +----------------------------------------------------------------------
  7. // | 开源协议 https://mit-license.org
  8. // +----------------------------------------------------------------------
  9. // | github开源项目:https://github.com/zhongshaofa/EasyAdmin
  10. // +----------------------------------------------------------------------
  11. namespace app\common\model;
  12. use think\Model;
  13. use think\model\concern\SoftDelete;
  14. /**
  15. * 有关时间的模型
  16. * Class TimeModel
  17. * @package app\common\model
  18. */
  19. class TimeModel extends Model
  20. {
  21. /**
  22. * 自动时间戳类型
  23. * @var string
  24. */
  25. protected $autoWriteTimestamp = true;
  26. /**
  27. * 添加时间
  28. * @var string
  29. */
  30. protected $createTime = 'create_time';
  31. /**
  32. * 更新时间
  33. * @var string
  34. */
  35. protected $updateTime = 'update_time';
  36. /**
  37. * 软删除
  38. */
  39. use SoftDelete;
  40. protected $deleteTime = false;
  41. }