<?php
/**
 * 单据打印统计
 * Created by PhpStorm.
 * User: XiaoMing
 * Date: 2020/4/17
 * Time: 16:52
 */

namespace JinDouYun\Dao\System;

use JinDouYun\Dao\BaseDao;

class DPrintNum extends BaseDao
{
    public function __construct($serviceDB = 'default')
    {
        $this->_table = 'print_num';
        $this->_primary = 'id';
        $this->_fields = [
            "id",//int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT 'id',
            "objectNo",//char(25) NOT NULL COMMENT '对象单据号',
            "objectType",//int(3) NOT NULL COMMENT '对象类型',
            "printNum",//int(4) NOT NULL COMMENT '打印次数',
            "enterpriseId",//int(10) NOT NULL COMMENT '企业Id',
            "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);
    }
}