/
issues.eschema
114 lines (72 loc) · 2.68 KB
/
issues.eschema
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
#
# This source file is part of the EdgeDB open source project.
#
# Copyright 2016-present MagicStack Inc. and the EdgeDB authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
abstract type Text:
# This is an abstract object containing text.
required property body -> str:
# Maximum length of text is 10000 characters.
constraint maxlength(10000)
abstract type Named:
required property name -> str
# Dictionary is a NamedObject variant, that enforces
# name uniqueness across all instances if its subclass.
abstract type Dictionary extending Named:
inherited required property name -> str:
delegated constraint exclusive
abstract link todo:
property rank -> int64:
default := 42
type User extending Dictionary:
multi link todo -> Issue
abstract type Owned:
# By default links are optional.
required link owner -> User
type Status extending Dictionary
type Priority extending Dictionary
type LogEntry extending Owned, Text:
# LogEntry is an Owned and a Text, so it
# will have all of their links and attributes,
# in particular, owner and text links.
required property spent_time -> int64
scalar type issue_num_t extending std::str
type Comment extending Text, Owned:
required link issue -> Issue
link parent -> Comment
type Issue extending Named, Owned, Text:
required property number -> issue_num_t:
readonly := true
constraint exclusive
required link status -> Status
link priority -> Priority
multi link watchers -> User
property time_estimate -> int64
multi link time_spent_log -> LogEntry
property start_date -> datetime:
default := SELECT datetime_current()
# The default value of start_date will be a
# result of the EdgeQL expression above.
property due_date -> datetime
multi link related_to -> Issue
multi link references -> File, URL, Publication
property tags -> array<str>
type File extending Named
type URL extending Named:
required property address -> str
type Publication:
required property title -> str
abstract constraint my_enum(enum: array<anytype>):
expr := array_contains($enum, __subject__)