add first classes
This commit is contained in:
parent
467ee78f59
commit
2cfee5c23a
14
vcinema_utils/VCinemaFilm.py
Normal file
14
vcinema_utils/VCinemaFilm.py
Normal 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
6
vcinema_utils/Viewing.py
Normal 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
|
Loading…
x
Reference in New Issue
Block a user