_table = 'warehouse_beginning'; $this->_primary = 'id'; $this->_fields = [ "id", //int(10) NOT NULL AUTO_INCREMENT COMMENT '自增id', 'no', "warehouseId", //int(10) NOT NULL COMMENT '仓库id', "operatorId", //int(10) DEFAULT NULL COMMENT '操作人id', "operatorName", //varchar(30) DEFAULT NULL COMMENT '操作人name', "remark", //varchar(255) DEFAULT NULL COMMENT '备注', "materielId", //int(10) DEFAULT NULL COMMENT '物料id', "materielName", //varchar(40) DEFAULT NULL COMMENT '物料名称', "materielCode", "skuId", //int(10) DEFAULT NULL COMMENT '单位id', "num", //decimal(10,8) DEFAULT NULL COMMENT '数量', "costPrice", //decimal(10,4) DEFAULT NULL COMMENT '成本价', "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); } }