change db model
This commit is contained in:
parent
eee5fd095a
commit
d89c2591c5
@ -59,6 +59,7 @@ class Customer(db.Entity):
|
|||||||
tickets = Set("Ticket")
|
tickets = Set("Ticket")
|
||||||
appointments = Set(Appointment)
|
appointments = Set(Appointment)
|
||||||
notes = Optional(str)
|
notes = Optional(str)
|
||||||
|
planner = Optional("Planner")
|
||||||
|
|
||||||
|
|
||||||
class Ticket(db.Entity):
|
class Ticket(db.Entity):
|
||||||
@ -66,7 +67,7 @@ class Ticket(db.Entity):
|
|||||||
ref = Optional(str, unique=True)
|
ref = Optional(str, unique=True)
|
||||||
service_category = Required("Service_category")
|
service_category = Required("Service_category")
|
||||||
customer = Required(Customer)
|
customer = Required(Customer)
|
||||||
appointment = Required(Appointment)
|
appointment = Optional(Appointment)
|
||||||
notes = Optional(str)
|
notes = Optional(str)
|
||||||
|
|
||||||
|
|
||||||
@ -80,10 +81,11 @@ class Service_category(db.Entity):
|
|||||||
description = Optional(str)
|
description = Optional(str)
|
||||||
|
|
||||||
|
|
||||||
class Planner(Customer):
|
class Planner(db.Entity):
|
||||||
plannings = Set(Planning)
|
plannings = Set(Planning)
|
||||||
password = Required(str)
|
password = Required(str)
|
||||||
is_admin = Optional(bool)
|
is_admin = Optional(bool)
|
||||||
|
customer = Required(Customer)
|
||||||
|
|
||||||
|
|
||||||
def parse_uri(database_uri):
|
def parse_uri(database_uri):
|
||||||
|
Loading…
Reference in New Issue
Block a user