12 lines
470 B
Python
12 lines
470 B
Python
class Game:
|
|
def __init__(self, board_game_id, name, genre, publisher, price, count = None):
|
|
self.board_game_id = board_game_id
|
|
self.name = name
|
|
self.genre = genre
|
|
self.publisher = publisher
|
|
self.price = price
|
|
self.count = count
|
|
|
|
def __str__(self):
|
|
return f"{self.name}\nЖанр: {self.genre}\nИздатель: {self.publisher}\n{self.price}" + (f"\n{self.count} шт." if self.count is not None else "")
|