<?php
/**
 * 打卡时间模板
 * Created by PhpStorm.
 * User: wxj
 * Date: 2019/10/31
 * Time: 15:02
 */

namespace JinDouYun\Dao\Shop;

use JinDouYun\Dao\BaseDao;

class DShopRostering extends BaseDao
{
    public function __construct($serviceDB = 'default')
    {
        $this->_table = 'shop_rostering';
        $this->_primary = 'id';
        $this->_fields = [
            "id", // int unsigned NOT NULL AUTO_INCREMENT,
            "name", // varchar(255) COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '名称',
            "template_id", // char(50) COLLATE utf8mb4_general_ci NOT NULL COMMENT '绑定模板',
            "shop_id", // int NOT NULL,
            "uid", // int NOT NULL COMMENT '员工id',
            "time", // int NOT NULL COMMENT '排班日期',
            "time_slot",//text COLLATE utf8mb4_general_ci NOT NULL COMMENT '时间段',
            "clock", //text COLLATE utf8mb4_general_ci COMMENT '打卡时间段',
            "createTime", // int DEFAULT NULL COMMENT '创建时间',
        ];
        $this->_readonly = ['id'];
        $this->_create_autofill = [
            'createTime' => time()
        ];

        parent::__construct($serviceDB);
    }
}