明树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
06325b1e
Commit
06325b1e
authored
Sep 13, 2024
by
zengfanpei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
2efffc91
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
52 additions
and
2 deletions
+52
-2
letianAgrWarning.js
db/models/letianAgrWarning.js
+44
-0
letianPlantCycle.js
db/models/letianPlantCycle.js
+5
-1
systemUser.js
db/models/systemUser.js
+3
-1
No files found.
db/models/letianAgrWarning.js
0 → 100644
View file @
06325b1e
const
mongoose
=
require
(
'mongoose'
);
const
Schema
=
mongoose
.
Schema
;
const
moment
=
require
(
'moment'
);
/**
* 农事预警 根据生长周期 写定时脚本 每日检查 生成通知及预警信息
*/
const
AgrTaskSchema
=
new
Schema
({
zone
:
{
type
:
mongoose
.
Types
.
ObjectId
,
},
land
:
{
type
:
mongoose
.
Types
.
ObjectId
,
},
createdAt
:
{
type
:
Date
,
default
:
Date
.
now
,
get
:
v
=>
moment
(
v
).
format
(
"YYYY-MM-DD HH:mm:ss"
),
},
updatedAt
:
{
type
:
Date
,
default
:
Date
.
now
,
get
:
v
=>
moment
(
v
).
format
(
"YYYY-MM-DD HH:mm:ss"
),
},
del
:
{
type
:
Number
,
default
:
0
,
comment
:
'默认0 , 1:表示删除,若有其他隐藏业务 不要混用此字段。'
}
},
{
toJSON
:
{
getters
:
true
}
});
const
AgrTask
=
mongoose
.
model
(
'AgrTask'
,
AgrTaskSchema
,
'letianAgrTask'
);
module
.
exports
=
AgrTask
;
\ No newline at end of file
db/models/letianPlantCycle.js
View file @
06325b1e
...
@@ -17,7 +17,11 @@ const PlantCycleSchema = new Schema({
...
@@ -17,7 +17,11 @@ const PlantCycleSchema = new Schema({
endTime
:
{
endTime
:
{
type
:
Date
,
type
:
Date
,
},
},
content
:
{
type
:
String
,
comment
:
"内容 : 注意事项"
},
createdAt
:
{
createdAt
:
{
...
...
db/models/systemUser.js
View file @
06325b1e
...
@@ -57,7 +57,9 @@ const userSchema = new Schema({
...
@@ -57,7 +57,9 @@ const userSchema = new Schema({
avatar
:
{
avatar
:
{
type
:
mongoose
.
Types
.
ObjectId
,
type
:
mongoose
.
Types
.
ObjectId
,
ref
:
'File'
,
ref
:
'File'
,
comment
:
"头像文件"
comment
:
"头像文件"
,
default
:
null
,
set
:
v
=>
{
if
(
!
v
)
{
return
null
;}
else
{
return
v
;}}
},
},
...
...
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