AppBookCollect.php 604 B

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