_table = 'report_loss_details'; $this->_primary = 'id'; $this->_fields = [ "id", //int(10) NOT NULL AUTO_INCREMENT COMMENT '主键自增id', "linkId", //int(10) NOT NULL COMMENT '连接id', "linkNo", //char(25) NOT NULL COMMENT '连接单号', "materielId", //int(10) NOT NULL COMMENT '物料id', "materielCode", //char(21) NOT NULL COMMENT '物料code', "materielName", //varchar(50) NOT NULL COMMENT '物料名称', "skuId", //int(10) NOT NULL COMMENT '单位id', "unitName", //varchar(255) DEFAULT NULL COMMENT '单位名称', "skuName", //varchar(255) DEFAULT NULL COMMENT '属性名称', "inventoryNum", //decimal(20,8) NOT NULL COMMENT '账面库存', "num", //decimal(20,8) NOT NULL COMMENT '损失库存', "otherNum",// decimal(20,8) DEFAULT '0.00000000' COMMENT '其他单位数量', "lastNum", //decimal(20,8) NOT NULL COMMENT '剩余库存', "lossAmount", //decimal(20,4) DEFAULT NULL COMMENT '损失金额', "remark", //varchar(255) DEFAULT NULL COMMENT '备注', "deleteStatus", //tinyint(3) DEFAULT '5' COMMENT '删除状态 5:正常 4:删除', "createTime", //int(10) NOT NULL COMMENT '创建时间', "updateTime", //int(10) NOT NULL COMMENT '修改时间', "extend", //json DEFAULT NULL COMMENT '扩展字段', 'areaId', 'areaName', 'areaCode', 'storageLocationId', 'storageLocationName', 'storageLocationCode', ]; $this->_readonly = ['id']; $this->_create_autofill = [ 'createTime' => time() ]; $this->_update_autofill = [ 'updateTime' => time() ]; parent::__construct($serviceDB); } }