From d89c2591c5bc736afb209f024447436f9869c9f3 Mon Sep 17 00:00:00 2001 From: vincent Date: Sun, 13 Jun 2021 21:00:52 +0200 Subject: [PATCH] change db model --- ITPlanning/db.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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):