<?php
/**
 * 商户分组Dao
 * Created by PhpStorm.
 * User: haoren
 * Date: 2020/09/25
 * Time: 15:00
 */

namespace JinDouYun\Dao\Merchant;

use JinDouYun\Dao\BaseDao;

class DMerchantGroup extends BaseDao
{
    public function __construct($serviceDB = 'default')
    {
        $this->_table = 'commission_businessman';
        $this->_primary = 'id';
        $this->_fields = [
            "id", //int(10) NOT NULL AUTO_INCREMENT COMMENT '商户分组表',
            "enterpriseId", //int(10) NOT NULL COMMENT '企业id',
            "pid", //int(10) NOT NULL DEFAULT '0' COMMENT '上级分类',
            "title", //varchar(255) NOT NULL COMMENT '分类名称',
            "deleteStatus", //tinyint(3) NOT NULL COMMENT '分类状态 4:删除 5:正常',
            "createTime", //int(10) NOT NULL COMMENT '创建时间',
            "updateTime", //int(10) NOT NULL COMMENT '修改时间',
            "extend", //json DEFAULT NULL COMMENT '扩展字段',
        ];
        $this->_readonly = ['id'];
        $this->_create_autofill = [
            'createTime' => time()
        ];
        $this->_update_autofill = [
            'updateTime' => time()
        ];

        parent::__construct($serviceDB);
    }
}