BaseModel.php 614 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. <?php
  2. namespace app\common\model;
  3. use app\http\DbOperation;
  4. use think\Model;
  5. use think\model\concern\SoftDelete;
  6. class BaseModel extends Model
  7. {
  8. use SoftDelete;
  9. use DbOperation;
  10. /**
  11. * @var string
  12. */
  13. protected $createTime = 'created_at';
  14. /**
  15. * @var string
  16. */
  17. protected $updateTime = 'updated_at';
  18. /**
  19. * @var string
  20. */
  21. protected $deleteTime = 'deleted_at';
  22. /**
  23. * @var int
  24. */
  25. protected $defaultSoftDelete = 0;
  26. /**
  27. * @var bool
  28. */
  29. protected $autoWriteTimestamp = true;
  30. }