16 lines
408 B
Python
16 lines
408 B
Python
# 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
|
|
}
|