mirror of
https://github.com/aljazceru/python-teos.git
synced 2026-02-23 15:34:18 +01:00
refactors project structure
This commit is contained in:
25
pisa/appointment.py
Normal file
25
pisa/appointment.py
Normal file
@@ -0,0 +1,25 @@
|
||||
from pisa.encrypted_blob import EncryptedBlob
|
||||
|
||||
|
||||
# Basic appointment structure
|
||||
class Appointment:
|
||||
def __init__(self, locator, start_time, end_time, dispute_delta, encrypted_blob, cipher, hash_function):
|
||||
self.locator = locator
|
||||
self.start_time = start_time # ToDo: #4-standardize-appointment-fields
|
||||
self.end_time = end_time # ToDo: #4-standardize-appointment-fields
|
||||
self.dispute_delta = dispute_delta
|
||||
self.encrypted_blob = EncryptedBlob(encrypted_blob)
|
||||
self.cipher = cipher
|
||||
self.hash_function = hash_function
|
||||
|
||||
def to_json(self):
|
||||
appointment = {"locator": self.locator, "start_time": self.start_time, "end_time": self.end_time,
|
||||
"dispute_delta": self.dispute_delta, "encrypted_blob": self.encrypted_blob.data,
|
||||
"cipher": self.cipher, "hash_function": self.hash_function}
|
||||
|
||||
return appointment
|
||||
|
||||
# ToDO: #3-improve-appointment-strcuture
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user