_table = 'stocktaking_details'; $this->_primary = 'id'; $this->_fields = [ "id", //int(10) NOT NULL AUTO_INCREMENT COMMENT '主键自增id', "linkId", //int(10) NOT NULL COMMENT '连接盘点id', "linkNo", //char(21) 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', "documentInventoryNum", //decimal(20,8) NOT NULL COMMENT '账面库存', "currentInventoryNum", //decimal(20,8) NOT NULL COMMENT '实盘库存', "differenceNum", //decimal(20,8) NOT NULL COMMENT '盈亏数量', "otherNum",// decimal(20,8) DEFAULT '0.00000000' COMMENT '其他单位', "differenceStatus", //tinyint(3) NOT NULL COMMENT '盈亏状态 5:盈 4:亏', "deleteStatus", "remark", "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); } }