diff --git a/ITPlanning/db.py b/ITPlanning/db.py index c5ff613..7fa8bc9 100644 --- a/ITPlanning/db.py +++ b/ITPlanning/db.py @@ -59,6 +59,7 @@ class Customer(db.Entity): tickets = Set("Ticket") appointments = Set(Appointment) notes = Optional(str) + planner = Optional("Planner") class Ticket(db.Entity): @@ -66,7 +67,7 @@ class Ticket(db.Entity): ref = Optional(str, unique=True) service_category = Required("Service_category") customer = Required(Customer) - appointment = Required(Appointment) + appointment = Optional(Appointment) notes = Optional(str) @@ -80,10 +81,11 @@ class Service_category(db.Entity): description = Optional(str) -class Planner(Customer): +class Planner(db.Entity): plannings = Set(Planning) password = Required(str) is_admin = Optional(bool) + customer = Required(Customer) def parse_uri(database_uri):