forked from NDresevic/timetable-generator
-
Notifications
You must be signed in to change notification settings - Fork 0
/
model.py
executable file
·38 lines (27 loc) · 999 Bytes
/
model.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
30
31
32
33
34
35
36
37
38
class Class:
def __init__(self, groups, teacher, subject, type, duration, classrooms):
self.groups = groups
self.teacher = teacher
self.subject = subject
self.type = type
self.duration = duration
self.classrooms = classrooms
def __str__(self):
return "Groups {} | Teacher '{}' | Subject '{}' | Type {} | {} hours | Classrooms {} \n"\
.format(self.groups, self.teacher, self.subject, self.type, self.duration, self.classrooms)
def __repr__(self):
return str(self)
class Classroom:
def __init__(self, name, type):
self.name = name
self.type = type
def __str__(self):
return "{} - {} \n".format(self.name, self.type)
def __repr__(self):
return str(self)
class Data:
def __init__(self, groups, teachers, classes, classrooms):
self.groups = groups
self.teachers = teachers
self.classes = classes
self.classrooms = classrooms