Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
V
ViaResto-website
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
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Aymeric Chaumont
ViaResto-website
Commits
b399eabb
Commit
b399eabb
authored
2 years ago
by
Antoine Gaudron-Desjardins
Browse files
Options
Downloads
Patches
Plain Diff
add id in returned closure so we can could delete it from the admin interface
parent
76a58fcb
Branches
Branches containing commit
No related tags found
1 merge request
!47
Exceptional closure
Pipeline
#44400
passed with warnings
2 years ago
Stage: build
Stage: test
Changes
1
Pipelines
2
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
backend/db/schemas.py
+11
-2
11 additions, 2 deletions
backend/db/schemas.py
with
11 additions
and
2 deletions
backend/db/schemas.py
+
11
−
2
View file @
b399eabb
...
...
@@ -68,6 +68,7 @@ class NewsBase(BaseModel):
class
News
(
NewsBase
):
"""
Database news base schema
"""
id
:
int
published_at
:
datetime
=
Field
(...,
title
=
"
Publication date of the news
"
)
class
Config
:
...
...
@@ -99,13 +100,21 @@ class OpeningHours(OpeningHoursBase):
orm_mode
=
True
class
Closure
(
BaseModel
):
"""
Closure schema
"""
class
Closure
Base
(
BaseModel
):
"""
Closure schema
base
"""
place
:
str
=
Field
(...,
title
=
"
Name of the restaurant
"
)
beginning_date
:
datetime
=
Field
(...,
title
=
"
Beginning date of closure
"
)
end_date
:
datetime
=
Field
(...,
title
=
"
Ending date of closure
"
)
class
Closure
(
ClosureBase
):
"""
Closure schema
"""
id
:
int
class
Config
:
orm_mode
=
True
class
Restaurant
(
BaseModel
):
"""
Restaurant schema for reading
"""
name
:
str
...
...
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