add first classes

This commit is contained in:
Sarah 2022-12-18 17:15:47 +00:00
parent 467ee78f59
commit 2cfee5c23a
2 changed files with 20 additions and 0 deletions

View File

@ -0,0 +1,14 @@
from vcinema_utils.Viewing import Viewing
class VCinemaFilm:
def __init__(self, name, imdb_id):
self.name = name
self.imdb_id = imdb_id
self.viewings = []
def add_viewing(self, date, season, rating):
viewing = Viewing(date, season, rating)
self.viewings.append(viewing)

6
vcinema_utils/Viewing.py Normal file
View File

@ -0,0 +1,6 @@
class Viewing:
def __init__(self, date_watched, season, rating):
self.date_watched = date_watched
self.season = season
self.rating = rating