_table = 'purchase_out'; $this->_primary = 'id'; $this->_fields = [ "id", //int(10) NOT NULL AUTO_INCREMENT, "purchaseId", //int(10) NOT NULL DEFAULT '0' COMMENT '采购单id', "purchaseNo", //bigint(20) NOT NULL COMMENT '采购订单号', "no", //bigint(20) NOT NULL COMMENT '采购退货单号', "shopId", //int(10) NOT NULL DEFAULT '0' COMMENT '门店id', "shopName", //varchar(255) NOT NULL DEFAULT '' COMMENT '门店名称', "supplierId", //int(10) NOT NULL DEFAULT '0' COMMENT '供应商Id', "supplierName", //varchar(255) NOT NULL DEFAULT '' COMMENT '供应商名称', "buyerId", //int(10) NOT NULL DEFAULT '0' COMMENT '采购人员Id', "buyerName", //varchar(255) NOT NULL DEFAULT '' COMMENT '采购人员名称', "remark", //varchar(255) NOT NULL DEFAULT '' COMMENT '备注', "operatorId", //int(10) NOT NULL DEFAULT '0' COMMENT '制单人员Id', "operatorName", //varchar(255) NOT NULL DEFAULT '' COMMENT '制单人名', "purchaseAmount", //decimal(12,4) default '0.0000' COMMENT '采购退货金额', "couponAmount", //decimal(12,4) default '0.0000' COMMENT '优惠金额', "otherAmount", //decimal(12,4) default '0.0000' COMMENT '其他金额', "extends", //json DEFAULT NULL COMMENT '拓展字段', "orderStatus", "auditStatus", //tinyint(3) NOT NULL DEFAULT '1' COMMENT '审核状态 默认1 待审 2审核通过 3审核未通过 4审核中', "deleteStatus", //tinyint(3) NOT NULL DEFAULT '5' COMMENT '是否删除 默认5 正常 4删除', "auditId", //int(10) NOT NULL DEFAULT '0' COMMENT '审核人员Id', "auditName", //varchar(255) NOT NULL DEFAULT '' COMMENT '审核人员名册', "auditTime", //int(10) NOT NULL DEFAULT '0' 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); } }