明树Git Lab
Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
L
letian_backend
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
zengfanpei
letian_backend
Commits
841bc72b
Commit
841bc72b
authored
Mar 18, 2025
by
zfp1
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
2f0b91ec
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
42 additions
and
26 deletions
+42
-26
letianProTraceCode.js
db/models/letianProTraceCode.js
+9
-5
letianProductDeep.js
db/models/letianProductDeep.js
+33
-21
No files found.
db/models/letianProTraceCode.js
View file @
841bc72b
...
@@ -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
,
...
...
db/models/letianProductDeep.js
View file @
841bc72b
...
@@ -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
:
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment