<?php
/**
 * 职工管理Dao
 * Created by PhpStorm.
 * User: 小威
 * Date: 2019/10/31
 * Time: 18:00
 */

namespace JinDouYun\Dao\Department;

use JinDouYun\Dao\BaseDao;

class DRole extends BaseDao
{
    public function __construct($serviceDB = 'default')
    {
        $this->_table = 'department_role';
        $this->_primary = 'id';
        $this->_fields = [
            "id", //int(10) NOT NULL AUTO_INCREMENT COMMENT '自增id',
            "shopId", //int(10) DEFAULT NULL COMMENT '商铺id',
            "roleName", //varchar(255) NOT NULL COMMENT '角色名称',
            "pid", //int(10) NOT NULL COMMENT '上级id',
            "deleteStatus", //tinyint(3) DEFAULT '5' COMMENT '删除状态 4:删除 5:正常',
            "updateTime", //int(10) DEFAULT NULL COMMENT '更新时间',
            "createTime", //int(10) DEFAULT NULL COMMENT '创建时间',
            "extend", //json DEFAULT NULL COMMENT '扩展字段',
            "signId", //int(10) DEFAULT '0' COMMENT '标示id',
        ];
        $this->_readonly = ['id'];
        $this->_create_autofill = [
            'createTime' => time()
        ];
        $this->_update_autofill = [
            'updateTime' => time()
        ];

        parent::__construct($serviceDB);
    }
}