Skip to content
This repository was archived by the owner on May 16, 2023. It is now read-only.

Commit 910333e

Browse files
authored
Merge pull request #7 from Kittonn/dev
chore: lab #7
2 parents 536f15e + 2147b40 commit 910333e

File tree

1 file changed

+119
-69
lines changed

1 file changed

+119
-69
lines changed

lab/week_7/lab_7.py

Lines changed: 119 additions & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -15,23 +15,23 @@ class BookingStatus(Enum):
1515

1616
class Account:
1717
def __init__(self, id, password, status):
18-
self.id = id
19-
self.password = password
20-
self.status = status
18+
self.__id = id
19+
self.__password = password
20+
self.__status = status
2121

22-
def resetPassword(self):
22+
def changePassword(self):
2323
pass
2424

2525

2626
class Person:
27-
def __init__(self, full_name, address, phone_number, email, birth_date, emergency_contact, emergency_contact_phone_number):
28-
self.full_name = full_name
29-
self.address = address
30-
self.phone_number = phone_number
31-
self.email = email
32-
self.birth_date = birth_date
33-
self.emergency_contact = emergency_contact
34-
self.emergency_contact_phone_number = emergency_contact_phone_number
27+
def __init__(self, fullname, email, phone_number, address, birth_date, emergency_contact_fullname, emergency_contact_phone_number):
28+
self.__fullname = fullname
29+
self.__email = email
30+
self.__phone_number = phone_number
31+
self.__address = address
32+
self.__birth_date = birth_date
33+
self.__emergency_contact_fullname = emergency_contact_fullname
34+
self.__emergency_contact_phone_number = emergency_contact_phone_number
3535

3636
def makeBooking(self):
3737
pass
@@ -40,96 +40,110 @@ def getBooking(self):
4040
pass
4141

4242

43-
class Admin(Person):
44-
def __init__(self, full_name, address, phone_number, email, birth_date, emergency_contact, emergency_contact_phone_number):
45-
super().__init__(full_name, address, phone_number, email,
46-
birth_date, emergency_contact, emergency_contact_phone_number)
47-
48-
def addField(self):
49-
pass
43+
class FrontDesk(Person):
44+
def __init__(self, fullname, email, phone_number, address, birth_date, emergency_contact_fullname, emergency_contact_phone_number):
45+
super().__init__(fullname, email, phone_number, address, birth_date,
46+
emergency_contact_fullname, emergency_contact_phone_number)
5047

5148
def addBooking(self):
5249
pass
5350

54-
def addNews(self):
51+
def addSlot(self):
5552
pass
5653

57-
def addSlot(self):
54+
def approveBooking(self):
5855
pass
5956

6057

6158
class Customer(Person):
62-
def __init__(self, full_name, address, phone_number, email, birth_date, emergency_contact, emergency_contact_phone_number):
63-
super().__init__(full_name, address, phone_number, email,
64-
birth_date, emergency_contact, emergency_contact_phone_number)
59+
def __init__(self, fullname, email, phone_number, address, birth_date, emergency_contact_fullname, emergency_contact_phone_number):
60+
super().__init__(fullname, email, phone_number, address, birth_date,
61+
emergency_contact_fullname, emergency_contact_phone_number)
6562

6663

67-
class Guest:
68-
def __init__(self):
64+
class Admin(Person):
65+
def __init__(self, fullname, email, phone_number, address, birth_date, emergency_contact_fullname, emergency_contact_phone_number):
66+
super().__init__(fullname, email, phone_number, address, birth_date,
67+
emergency_contact_fullname, emergency_contact_phone_number)
68+
69+
def addField(self):
6970
pass
7071

71-
def registerAccount(self):
72+
def editField(self):
7273
pass
7374

75+
def deleteField(self):
76+
pass
7477

75-
class Booking:
76-
def __init__(self, booking_id, status, created_on, description):
77-
self.booking_id = booking_id
78-
self.status = status
79-
self.created_on = created_on
80-
self.description = description
78+
def addBooking(self):
79+
pass
8180

82-
def cancel(self):
81+
def approveBooking(self):
8382
pass
8483

85-
def approve(self):
84+
def addNews(self):
8685
pass
8786

87+
def editNews(self):
88+
pass
8889

89-
class Slot:
90-
def __init__(self, created_on, start_time, end_time):
91-
self.created_on = created_on
92-
self.start_time = start_time
93-
self.end_time = end_time
90+
def deleteNews(self):
91+
pass
9492

93+
def addSlot(self):
94+
pass
9595

96-
class SlotDate(Slot):
97-
def __init__(self, created_on, start_time, end_time, date):
98-
super().__init__(created_on, start_time, end_time)
99-
self.date = date
96+
def editSlot(self):
97+
pass
10098

99+
def deleteSlot(self):
100+
pass
101101

102-
class Field:
103-
def __init__(self, name, description, price_by_slot, category, type):
104-
self.name = name
105-
self.description = description
106-
self.price_by_slot = price_by_slot
107-
self.category = category
108-
self.type = type
102+
def blockUser(self):
103+
pass
109104

110-
def getSlot(self):
105+
106+
class Guest:
107+
def __init__(self):
111108
pass
112109

110+
def registerAccount(self):
111+
pass
113112

114-
class Category:
115-
def __init__(self, field_category):
116-
self.field_category = field_category
113+
def loginAccount(self):
114+
pass
117115

118116

119117
class News:
120118
def __init__(self, title, content, image_url, created_on, status):
121-
self.title = title
122-
self.content = content
123-
self.image_url = image_url
124-
self.created_on = created_on
125-
self.status = status
119+
self.__title = title
120+
self.__content = content
121+
self.__image_url = image_url
122+
self.__created_on = created_on
123+
self.__status = status
124+
125+
126+
class Booking:
127+
def __init__(self, booking_id, status, created_on, description):
128+
self.__booking_id = booking_id
129+
self.__status = status
130+
self.__created_on = created_on
131+
self.__description = description
132+
133+
def cancel(self):
134+
pass
135+
136+
137+
class BookingHistory:
138+
def __init__(self, booking):
139+
self.__booking = booking
126140

127141

128142
class Equipment:
129143
def __init__(self, name, price, item):
130-
self.name = name
131-
self.price = price
132-
self.item = item
144+
self.__name = name
145+
self.__price = price
146+
self.__item = item
133147

134148

135149
class Vest(Equipment):
@@ -142,18 +156,54 @@ def __init__(self, name, price, item):
142156
super().__init__(name, price, item)
143157

144158

159+
class Slot:
160+
def __init__(self, created_on, start_time, end_time):
161+
self.__created_on = created_on
162+
self.__start_time = start_time
163+
self.__end_time = end_time
164+
165+
166+
class SlotDate(Slot):
167+
def __init__(self, created_on, start_time, end_time, date):
168+
super().__init__(created_on, start_time, end_time)
169+
self.__date = date
170+
171+
172+
class Field:
173+
def __init__(self, name, description, price_by_slot, category, type):
174+
self.__name = name
175+
self.__description = description
176+
self.__price_by_slot = price_by_slot
177+
self.__category = category
178+
self.__type = type
179+
180+
def getSlot(self):
181+
pass
182+
183+
184+
class Category:
185+
def __init__(self, fields):
186+
self.__field_category = fields
187+
188+
def search_by_category(self):
189+
pass
190+
191+
def search_by_date(self):
192+
pass
193+
194+
145195
class Payment:
146196
def __init__(self, amount, created_on, payment_status, transaction_id):
147-
self.amount = amount
148-
self.created_on = created_on
149-
self.payment_status = payment_status
150-
self.transaction_id = transaction_id
197+
self.__amount = amount
198+
self.__created_on = created_on
199+
self.__payment_status = payment_status
200+
self.__transaction_id = transaction_id
151201

152202

153203
class QRCodeTransaction(Payment):
154-
def __init__(self, amount, created_on, payment_status, transaction_id, qrcode_url):
204+
def __init__(self, amount, created_on, payment_status, transaction_id, qr_code):
155205
super().__init__(amount, created_on, payment_status, transaction_id)
156-
self.qrcode_url = qrcode_url
206+
self.__qr_code = qr_code
157207

158208

159209
class CashTransaction(Payment):

0 commit comments

Comments
 (0)