Skip to content

Commit

Permalink
Update models.py
Browse files Browse the repository at this point in the history
  • Loading branch information
vijaybalamahalingam authored Jul 31, 2023
1 parent 87fd01b commit 0b7eea3
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions server/djangoapp/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,3 +79,19 @@ def __str__(self):


# <HINT> Create a plain Python class `DealerReview` to hold review data
class DealerReview:
def __init__(self, dealership, name, purchase, review, purchase_date, car_make, car_model, car_year, sentiment, id):
self.dealership = dealership
self.name = name
self.purchase = purchase
self.review = review
self.purchase_date = purchase_date
self.car_make = car_make
self.car_model = car_model
self.car_year = car_year
self.sentiment = sentiment
self.id = id

def __str__(self):
return f"Review by {self.name} for {self.dealership} - Sentiment: {self.sentiment}"

0 comments on commit 0b7eea3

Please sign in to comment.