-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDTO.py
35 lines (28 loc) · 784 Bytes
/
DTO.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
# Data Transfer Objects:
class Vaccine:
# constructor DTO Vaccine
def __init__(self, line):
self.id = line[0]
self.date = line[1]
self.supplier = line[2]
self.quantity = line[3]
class Supplier:
# constructor DTO Supplier
def __init__(self, line):
self.id = line[0]
self.name = line[1]
self.logistic = line[2]
class Clinic:
# constructor DTO Clinic
def __init__(self, line):
self.id = line[0]
self.location = line[1]
self.demand = line[2]
self.logistic = line[3]
class Logistic:
# constructor DTO Logistic
def __init__(self, line):
self.id = line[0]
self.name = line[1]
self.count_sent = line[2]
self.count_received = line[3]