DZone.Class.php 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. <?php
  2. /**
  3. * 区块 Dao
  4. * Created by PhpStorm.
  5. * User: QianNiao-C
  6. * Date: 2019/10/25
  7. * Time: 11:38
  8. */
  9. namespace JinDouYun\Dao\BlockManage;
  10. use JinDouYun\Dao\BaseDao;
  11. class DZone extends BaseDao
  12. {
  13. public function __construct($serviceDB = 'default')
  14. {
  15. $this->_table = 'zone';
  16. $this->_primary = 'id';
  17. $this->_fields = [
  18. "id", //int(10) NOT NULL AUTO_INCREMENT,
  19. "zoneData", //json DEFAULT NULL COMMENT '区块数据',
  20. "extends", //json DEFAULT NULL COMMENT '拓展字段',
  21. "createTime", //int(10) NOT NULL DEFAULT '0' COMMENT '创建时间',
  22. "updateTime", //int(10) NOT NULL DEFAULT '0' COMMENT '更新时间',
  23. "enableStatus", //tinyint(3) NOT NULL DEFAULT '5' COMMENT '启用状态 默认5 启用 4禁用',
  24. "sort", //int(10) NOT NULL DEFAULT '0' COMMENT '排序 0-10 越小越靠前',
  25. "title",//varchar(50) NOT NULL DEFAULT NULL COMMENT '区块名称',
  26. ];
  27. $this->_readonly = ['id'];
  28. $this->_create_autofill = [
  29. 'createTime' => time()
  30. ];
  31. $this->_update_autofill = [
  32. 'updateTime' => time()
  33. ];
  34. parent::__construct($serviceDB);
  35. }
  36. }