明树Git Lab

Commit 841bc72b authored by zfp1's avatar zfp1

update

parent 2f0b91ec
...@@ -6,10 +6,10 @@ const moment = require('moment'); ...@@ -6,10 +6,10 @@ const moment = require('moment');
* 溯源码 * 溯源码
*/ */
const letianProTraceCodeSchema = new Schema({ const letianProTraceCodeSchema = new Schema({
proName: { // proName: {
type: String, // type: String,
comment: "产品名称" // comment: "产品名称"
}, // },
brand: String, //品牌 brand: String, //品牌
proInDate: { proInDate: {
type: Date, type: Date,
...@@ -35,7 +35,11 @@ const letianProTraceCodeSchema = new Schema({ ...@@ -35,7 +35,11 @@ const letianProTraceCodeSchema = new Schema({
}, },
source: { source: {
type: mongoose.Types.ObjectId, type: mongoose.Types.ObjectId,
comment: "源头productPre productDeep prodectPlant 三个" comment: "产品名称: 源头productPre productDeep prodectPlant 三个"
},
workshop: {
type: String,
comment: "生产车间"
}, },
creator: { creator: {
type: mongoose.Types.ObjectId, type: mongoose.Types.ObjectId,
......
...@@ -8,45 +8,45 @@ const moment = require('moment'); ...@@ -8,45 +8,45 @@ const moment = require('moment');
*/ */
const letianProductDeepSchema = new Schema({ const letianProductDeepSchema = new Schema({
sourcePlantProduct: { // sourcePlantProduct: {
type: mongoose.Types.ObjectId, // type: mongoose.Types.ObjectId,
ref: 'ProductPre', // ref: 'ProductPre',
comment: "来源初加工产品 靠产品名称关联" // comment: "来源初加工产品 靠产品名称关联"
}, // },
preProductName: { preProductName: {
type: String, type: String,
comment: "深加工产品名称" comment: "深加工产品名称"
}, },
varieties: { // varieties: {
type: String, // type: String,
comment: "品种" // comment: "品种"
}, // },
warehouseName: { warehouseName: {
type: String, type: String,
comment: "仓库名称" comment: "仓库名称"
}, },
inventoryQuantity: { // inventoryQuantity: {
type: String, // type: String,
comment: "库存量" // comment: "库存量"
}, // },
productPhotos: { productPhotos: {
type: mongoose.Types.ObjectId, type: mongoose.Types.ObjectId,
ref: 'File', ref: 'File',
comment: "产品照片" comment: "产品照片"
}, },
introduction: { // introduction: {
type: String, // type: String,
comment: "介绍内容" // comment: "介绍内容"
}, // },
processTime: { processTime: {
type: Date, type: Date,
default: Date.now, default: Date.now,
get: v => moment(v).format("YYYY-MM-DD HH:mm:ss"), get: v => moment(v).format("YYYY-MM-DD HH:mm:ss"),
}, },
qualityInfo: { // qualityInfo: {
type: String, // type: String,
comment: "质量信息" // comment: "质量信息"
}, // },
productNumber: { productNumber: {
type: String, type: String,
comment: "产品编号" comment: "产品编号"
...@@ -74,6 +74,18 @@ const letianProductDeepSchema = new Schema({ ...@@ -74,6 +74,18 @@ const letianProductDeepSchema = new Schema({
} }
] ]
}, },
productSpec: {
type: String,
comment: "产品规格"
},
productType: {
type: String,
comment: "产品类型"
},
workshop: {
type: String,
comment: "生产车间"
},
//原料信息 //原料信息
agrProVar: { agrProVar: {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment