forked from AdaGold/retro-video-store
-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ocelots - Eva and Lisa #16
Open
wich229
wants to merge
23
commits into
ada-ac2:main
Choose a base branch
from
wich229:main
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 1 commit
Commits
Show all changes
23 commits
Select commit
Hold shift + click to select a range
ac3dbc8
Added attributes to Customer and Video models, added routes to custom…
lisabethu88 328da39
Changed attributes in models
lisabethu88 117d079
add attrs in customer.py and video.py
wich229 4518081
need to add validate function to see if tests pass
lisabethu88 c98f2fe
customer_routes fixed and pass test.
wich229 1c939cc
wave1 customer and video routes.
wich229 fa58a4e
add rental model and routes_helper.py
wich229 75587be
working on rental routes
lisabethu88 0d51e49
merge changes
lisabethu88 c70fe36
Created route to create a rental
lisabethu88 0fa01d9
completed wave 02
lisabethu88 32abd41
wave 02 changes
lisabethu88 5de4710
rental routes changes
lisabethu88 c3ebae1
changes
lisabethu88 627beb2
fixed bugs
lisabethu88 69d642e
added helper functions, refactored routes
lisabethu88 f836317
refactored wave 01 and wave 02
lisabethu88 90935f2
wave3 pass tests before test on postman
wich229 8b42ff2
tested postman
wich229 5dbd2a1
trim datatime response
wich229 2289536
during testing on postman fixed some bugs
wich229 2b54534
Merge pull request #1 from wich229/Eva_wave03
wich229 17d1f93
add gunicorn in requirements.txt
wich229 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
tested postman
- Loading branch information
commit 8b42ff265710dd53fa9823e0fcc087bf585700ed
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,8 +5,8 @@ class Video(db.Model): | |
id = db.Column(db.Integer, primary_key = True, autoincrement = True) | ||
title = db.Column(db.String) | ||
release_date = db.Column(db.DateTime, default=datetime.date.today()) | ||
total_inventory = db.Column(db.Integer) | ||
available_inventory = db.Column(db.Integer) | ||
total_inventory = db.Column(db.Integer, default=0) | ||
available_inventory = db.Column(db.Integer, default=0) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is another field that we could derive, this time using |
||
customers = db.relationship("Customer", secondary="rental", back_populates="videos") | ||
|
||
def to_dict(self): | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
"""empty message | ||
|
||
Revision ID: 313fd793f3c1 | ||
Revises: 4f91cfaaeb9c | ||
Create Date: 2023-01-08 14:46:07.293738 | ||
|
||
""" | ||
from alembic import op | ||
import sqlalchemy as sa | ||
|
||
|
||
# revision identifiers, used by Alembic. | ||
revision = '313fd793f3c1' | ||
down_revision = '4f91cfaaeb9c' | ||
branch_labels = None | ||
depends_on = None | ||
|
||
|
||
def upgrade(): | ||
# ### commands auto generated by Alembic - please adjust! ### | ||
op.drop_column('rental', 'status') | ||
op.add_column('video', sa.Column('available_inventory', sa.Integer(), nullable=True)) | ||
# ### end Alembic commands ### | ||
|
||
|
||
def downgrade(): | ||
# ### commands auto generated by Alembic - please adjust! ### | ||
op.drop_column('video', 'available_inventory') | ||
op.add_column('rental', sa.Column('status', sa.VARCHAR(), autoincrement=False, nullable=True)) | ||
# ### end Alembic commands ### |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If there's a single route file it's okay to leave it in the app folder, but if we have more than one, for organization we should create a folder to hold all the route files.