Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
API Toucan
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Damien Armillon
API Toucan
Commits
ce7adb9a
Commit
ce7adb9a
authored
3 years ago
by
Inès Yeterian
Browse files
Options
Downloads
Patches
Plain Diff
add new ToucanD model, which final aim is to remplace the initial Toucan model
parent
68385ca8
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
backend/models/modelToucanD.js
+18
-0
18 additions, 0 deletions
backend/models/modelToucanD.js
with
18 additions
and
0 deletions
backend/models/modelToucanD.js
0 → 100644
+
18
−
0
View file @
ce7adb9a
var
mongoose
=
require
(
"
mongoose
"
);
var
Schema
=
mongoose
.
Schema
;
/**
* Indique ce que l'on doit trouver dans un toucan
*/
var
toucanDSchema
=
new
Schema
({
title
:
{
type
:
String
,
required
:
true
},
// Chaque toucan doit avoir un titre et une date
date
:
{
type
:
Date
,
required
:
true
},
issue
:
{
type
:
Number
,
required
:
true
},
urlId
:
{
type
:
String
,
required
:
true
}
});
// Le numéro doit être unique
toucanDSchema
.
index
({
issue
:
-
1
},{
unique
:
true
});
module
.
exports
=
mongoose
.
model
(
"
ToucanD
"
,
toucanDSchema
);
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment