-
Notifications
You must be signed in to change notification settings - Fork 32
/
Copy pathschema.py
53 lines (43 loc) · 1.11 KB
/
schema.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
####
# This is the script for storing the schema of your TerminusDB
# database for your project.
# Use 'terminusdb commit' to commit changes to the database and
# use 'terminusdb sync' to change this file according to
# the exsisting database schema
####
"""
Title: Phonebook for Awesome Startup
Description: Database storing all the contact details of all employees in Awesome Startup
Authors: Destiny Norris, Fabian Dalby
"""
from typing import Optional
from terminusdb_client.woqlschema import DocumentTemplate, EnumTemplate
class Address(DocumentTemplate):
"""Home address of Employee
Attributes
----------
postcode : str
Postal Code
street : str
Street name.
street_num : int
Street number.
town : str
Town name.
"""
_subdocument = []
postcode: str
street: str
street_num: int
town: str
class Employee(DocumentTemplate):
"""Employee of the Company"""
address: "Address"
contact_number: str
manager: Optional["Employee"]
name: str
team: "Team"
title: str
class Team(EnumTemplate):
marketing = ()
it = ()