_table = 'inventory_batch'; $this->_primary = 'id'; $this->_fields = [ "id", //int(10) NOT NULL AUTO_INCREMENT COMMENT '自增id', "originId", "originNo", "warehouseId", //int(10) NOT NULL COMMENT '仓库id', "materielId", //int(10) NOT NULL COMMENT '物料ID', "materielIdCode", //varchar(255) DEFAULT NULL COMMENT '物料编码', "sourceNo", // 来源单号 "skuId", //单位id 'batchNo', // 批次编号 'num', // 批次可用数量 "averageCost", //成本均价 'batchCost',//批次成本 'productionData',//生产日期 'batchStatus', "updateTime", //int(10) DEFAULT NULL COMMENT '修改时间', "createTime", //int(10) DEFAULT NULL COMMENT '创建时间', "extend", //json DEFAULT NULL COMMENT '扩展字段', ]; $this->_readonly = ['id']; $this->_create_autofill = [ 'createTime' => time(), ]; $this->_update_autofill = [ 'updateTime' => time() ]; parent::__construct($serviceDB); } }