Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
C4Ai_DR-P
public-service-provider
Commits
828a85dc
Commit
828a85dc
authored
Jul 03, 2020
by
Mahdi Sellami
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added dataObjects to application schema
parent
ce31992f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
1 deletion
+20
-1
models/application.js
models/application.js
+3
-1
models/dataObject.js
models/dataObject.js
+17
-0
No files found.
models/application.js
View file @
828a85dc
//Require Mongoose
var
mongoose
=
require
(
'
mongoose
'
);
var
PersonSchema
=
require
(
'
./person
'
).
schema
var
DataObjectSchema
=
require
(
'
./dataObject
'
).
schema
//Define a schema
var
Schema
=
mongoose
.
Schema
;
...
...
@@ -14,7 +15,8 @@ var ApplicationSchema = new Schema({
statusLastChangeDate
:
String
,
decisionDate
:
String
,
decisionJustification
:
String
,
applicant
:
PersonSchema
applicant
:
PersonSchema
,
dataObjects
:
[
DataObjectSchema
]
});
//Export function to create "Application" model class
...
...
models/dataObject.js
0 → 100644
View file @
828a85dc
//Require Mongoose
var
mongoose
=
require
(
'
mongoose
'
);
//Define a schema
var
Schema
=
mongoose
.
Schema
;
var
DataObjectSchema
=
new
Schema
({
dataObjectId
:
String
,
verfahrensId
:
String
,
leikaId
:
String
,
title
:
String
,
type
:
String
,
content
:
Schema
.
Types
.
Mixed
});
//Export function to create "DataObject" model class
module
.
exports
=
DataObject
=
mongoose
.
model
(
'
DataObject
'
,
DataObjectSchema
);
\ No newline at end of file
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