TestTimeStampModel.php 911 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. <?php
  2. /**
  3. * Created by PhpStorm.
  4. * User: Administrator
  5. * Date: 2019/11/3 0003
  6. * Time: 0:04
  7. */
  8. namespace EasySwoole\ORM\Tests\models;
  9. use EasySwoole\ORM\AbstractModel;
  10. /**
  11. * Class TestTimeStampModel
  12. * @package EasySwoole\ORM\Tests
  13. * @property mixed $id
  14. * @property mixed $name
  15. * @property mixed $age
  16. * @property mixed $create_at
  17. * @property mixed $update_at
  18. * @property mixed $create_time
  19. * @property mixed $update_time
  20. */
  21. class TestTimeStampModel extends AbstractModel
  22. {
  23. protected $tableName='tiamstamp_test';
  24. protected $autoTimeStamp = true;
  25. protected $createTime = 'create_at';
  26. protected $updateTime = 'update_at';
  27. public function setAutoTime($value){
  28. $this->autoTimeStamp = $value;
  29. }
  30. public function setCreateTime($value){
  31. $this->createTime = $value;
  32. }
  33. public function setUpdateTime($value){
  34. $this->updateTime = $value;
  35. }
  36. }