<?php
/**
 * 平台默认模版表
 * Created by PhpStorm.
 * User: XiaoMing
 * Date: 2020/4/14
 * Time: 9:51
 */

namespace JinDouYun\Dao\System;

use JinDouYun\Dao\BaseDao;

class DPageDefault extends BaseDao
{
    public function __construct($serviceDB = 'default')
    {
        $this->_table = 'page_default';
        $this->_primary = 'id';
        $this->_fields = [
            "id",//int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '页面id',
            "pageType",//tinyint(3) unsigned NOT NULL DEFAULT '10' COMMENT '页面类型(1首页 2自定义页)',
            "pageName",//varchar(255) NOT NULL DEFAULT '' COMMENT '页面名称',
            "pageData",//json DEFAULT NULL  COMMENT '页面数据',
            "enableStatus",//tinyint(3) NOT NULL DEFAULT '5' COMMENT '状态  默认5 正在使用 4未使用',
            "deleteStatus",//tinyint(3) NOT NULL DEFAULT '5' COMMENT '是否删除 默认5 正常 4删除',
            "extends",//json DEFAULT NULL COMMENT '拓展字段',
            "isDefault",// tinyint(3) NOT NULL DEFAULT '4' COMMENT '是否默认模版 默认5 5是 4否',
            "createTime",//int(10) NOT NULL DEFAULT '0' COMMENT '创建时间',
            "updateTime",//int(10) NOT NULL DEFAULT '0' COMMENT '更新时间',
        ];
        $this->_readonly = ['id'];
        $this->_create_autofill = [
            'createTime' => time()
        ];
        $this->_update_autofill = [
            'updateTime' => time()
        ];
        parent::__construct($serviceDB);
    }
}