mirror of
https://github.com/aljazceru/python-teos.git
synced 2025-12-17 06:04:21 +01:00
Splits DBManager in parent and child classes so a UserDBManager can be implemented
- DBManager preserves the basic methods, while the appointment related ones have been moved to AppointmentDBM. - AppointmentDBM handles json loads and dumps for appointments and trackers, so the corresponding methods can be removed from their classes. - Updates docs.
This commit is contained in:
@@ -81,19 +81,6 @@ class Appointment:
|
||||
|
||||
return appointment
|
||||
|
||||
def to_json(self):
|
||||
"""
|
||||
Exports an appointment as a deterministic json encoded string.
|
||||
|
||||
This method ensures that multiple invocations with the same data yield the same value. This is the format used
|
||||
to store appointments in the database.
|
||||
|
||||
Returns:
|
||||
:obj:`str`: A json-encoded str representing the appointment.
|
||||
"""
|
||||
|
||||
return json.dumps(self.to_dict(), sort_keys=True, separators=(",", ":"))
|
||||
|
||||
def serialize(self):
|
||||
"""
|
||||
Serializes an appointment to be signed.
|
||||
|
||||
Reference in New Issue
Block a user