<?php
/**
 * Created by PhpStorm.
 * User: kang
 * Date: 2021/4/13
 * Time: 19:58
 */

namespace JinDouYun\Dao\System;

use JinDouYun\Dao\BaseDao;

class DDriver extends BaseDao
{
    public function __construct($serviceDB = 'default')
    {
        $this->_table = 'driverRun';
        $this->_primary = 'id';
        $this->_fields = [
            "id", //int(10) NOT NULL AUTO_INCREMENT COMMENT '配送司机id',
            "routeId", //int(10) NOT NULL DEFAULT '0' COMMENT '线路id',
            "driverName", //char(20) NOT NULL COMMENT '司机姓名',
            "phone", //char(11) NOT NULL COMMENT '司机电话',
            "plateNumber", //char(20) NOT NULL COMMENT '车牌号',
            "remark", //char(20) DEFAULT NULL COMMENT '备注',
            "state", //tinyint(3) NOT NULL DEFAULT '5' COMMENT '启用状态 4:未启用 5:启用',
            "deleteStatus", //tinyint(3) NOT NULL DEFAULT '5' COMMENT '删除状态 4:删除 5:未删除',
            "enterpriseId", //int(10) NOT NULL COMMENT '企业id',
            "createTime", //int(11) NOT NULL COMMENT '创建时间',
            "updateTime", //int(11) DEFAULT NULL COMMENT '修改时间',
            "extends", //json DEFAULT NULL COMMENT '扩展字段',
            "orderIds", //varchar(255) DEFAULT NULL COMMENT '订单ids',
        ];
        $this->_readonly = ['id'];
        $this->_create_autofill = [
            'createTime' => time()
        ];
        $this->_update_autofill = [
            'updateTime' => time()
        ];

        parent::__construct($serviceDB);
    }
}