ChapterRemainAnalysis.php 651 B

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