AutoreplyCollect.php 592 B

12345678910111213141516171819202122232425262728
  1. <?php
  2. namespace app\common\model;
  3. use think\Model;
  4. class AutoreplyCollect extends Model
  5. {
  6. protected $table = 'autoreply_collect';
  7. // 自动写入时间戳字段
  8. protected $autoWriteTimestamp = 'int';
  9. // 定义时间戳字段名
  10. protected $createTime = 'createtime';
  11. protected $updateTime = 'updatetime';
  12. private $connect = NULL;
  13. public function __construct($data = [])
  14. {
  15. parent::__construct($data);
  16. if (!$this->connect) {
  17. $this->connect(get_db_collect($this->table));
  18. $this->connect = true;
  19. }
  20. }
  21. }