123456789101112131415161718192021222324252627282930313233343536373839404142434445 |
- <?php
- /**
- * 元素 Dao
- * Created by PhpStorm.
- * User: QianNiao-C
- * Date: 2019/10/25
- * Time: 15:05
- */
- namespace JinDouYun\Dao\BlockManage;
- use JinDouYun\Dao\BaseDao;
- class DElement extends BaseDao
- {
- public function __construct($serviceDB = 'default')
- {
- $this->_table = 'element';
- $this->_primary = 'id';
- $this->_fields = [
- "id", //int(10) NOT NULL AUTO_INCREMENT,
- "zoneId", //int(10) NOT NULL DEFAULT '0' COMMENT '区块id',
- "elementData", //json DEFAULT NULL COMMENT '元素数据',
- "extends", //json DEFAULT NULL COMMENT '拓展字段',
- "createTime", //int(10) NOT NULL DEFAULT '0' COMMENT '创建时间',
- "updateTime", //int(10) NOT NULL DEFAULT '0' COMMENT '更新时间',
- "deleteStatus", //tinyint(3) NOT NULL DEFAULT '5' COMMENT '是否删除 4 删除 5正常',
- "enableStatus", //tinyint(3) NOT NULL DEFAULT '5' COMMENT '启用状态 默认5 启用 6禁用',
- "sort", //int(10) NOT NULL DEFAULT '0' COMMENT '排序 0-10 越小越靠前',
- "startTime", //int(10) NOT NULL DEFAULT '0' COMMENT '开始投放时间',
- "endTime", //int(10) NOT NULL DEFAULT '0' COMMENT '投放结束时间',
- "title",//varchar(50) NOT NULL DEFAULT NULL COMMENT '元素名称',
- ];
- $this->_readonly = ['id'];
- $this->_create_autofill = [
- 'createTime' => time()
- ];
- $this->_update_autofill = [
- 'updateTime' => time()
- ];
- parent::__construct($serviceDB);
- }
- }
|