round 2
This commit is contained in:
15
api/child_rewards.py
Normal file
15
api/child_rewards.py
Normal file
@@ -0,0 +1,15 @@
|
||||
# api/child_rewards.py
|
||||
class ChildReward:
|
||||
def __init__(self, name: str, cost: int, image_id: str, reward_id: str):
|
||||
self.name = name
|
||||
self.cost = cost
|
||||
self.image_id = image_id
|
||||
self.id = reward_id
|
||||
|
||||
def to_dict(self):
|
||||
return {
|
||||
'id': self.id,
|
||||
'name': self.name,
|
||||
'cost': self.cost,
|
||||
'image_id': self.image_id
|
||||
}
|
||||
Reference in New Issue
Block a user