-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmodels.py
29 lines (25 loc) · 834 Bytes
/
models.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
class Task:
def __init__(self, task_id, title, description, assignee, reporter, status, priority):
self.task_id = task_id
self.title = title
self.description = description
self.assignee = assignee
self.reporter = reporter
self.status = status
self.priority = priority
def to_dict(self):
"""Convert Task object to a dictionary."""
return {
'task_id': self.task_id,
'title': self.title,
'description': self.description,
'assignee': self.assignee,
'reporter': self.reporter,
'status': self.status,
'priority': self.priority
}
class Board:
def __init__(self, board_id, name):
self.board_id = board_id
self.name = name
self.tasks = []