DElement.Class.php 1.6 KB

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