<?php
/**
 * 基本设置
 * Created by PhpStorm.
 * User: XiaoMing
 * Date: 2019/12/5
 * Time: 15:22
 */

namespace JinDouYun\Dao\System;

use JinDouYun\Dao\BaseDao;

class DBasicSetup extends BaseDao
{
    public function __construct($serviceDB = 'default')
    {
        $this->_table = 'basic_setup';
        $this->_primary = 'id';
        $this->_fields = [
            "id", //int(11) NOT NULL AUTO_INCREMENT COMMENT '自增id',
            "enterpriseId", //int(10) NOT NULL COMMENT '企业Id',
            "basicData", //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 '更新时间',
        ];
        $this->_readonly = ['id'];
        $this->_create_autofill = [
            'createTime' => time()
        ];
        $this->_update_autofill = [
            'updateTime' => time()
        ];

        parent::__construct($serviceDB);
    }
}