Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
CaCaoCritics
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
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
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
Bilel El Yaagoubi
CaCaoCritics
Merge requests
!5
Draft: Front bilel
Code
Review changes
Check out branch
Download
Patches
Plain diff
Expand sidebar
Open
Draft: Front bilel
front-bilel
into
master
Overview
0
Commits
8
Pipelines
7
Changes
2
Open
Bilel El Yaagoubi
requested to merge
front-bilel
into
master
3 years ago
Overview
0
Commits
8
Pipelines
7
Changes
2
0
0
Merge request reports
Viewing commit
32ec91a2
Prev
Next
Show latest version
2 files
+
5
−
1
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
2
32ec91a2
hop
· 32ec91a2
Bilel El Yaagoubi
authored
3 years ago
backend/models/movies.js
+
2
−
0
View file @ 32ec91a2
Edit in single-file editor
Open in Web IDE
Show full file
const
mongoose
=
require
(
"
mongoose
"
);
const
{
Schema
}
=
mongoose
;
const
MovieSchema
=
new
mongoose
.
Schema
({
publisher
:
{
type
:
String
,
required
:
true
},
title
:
{
type
:
String
,
required
:
true
,
unique
:
true
},
date
:
{
type
:
String
},
imageURL
:
{
type
:
String
},
viewers
:
[{
type
:
Schema
.
Types
.
ObjectId
,
ref
:
"
UserModel
"
}],
});
const
MovieModel
=
mongoose
.
model
(
"
MovieModel
"
,
MovieSchema
,
"
movies
"
);
Loading