File tree Expand file tree Collapse file tree 1 file changed +40
-0
lines changed Expand file tree Collapse file tree 1 file changed +40
-0
lines changed Original file line number Diff line number Diff line change
1
+ module default {
2
+ type Budget extending Project:: Child {
3
+ required status: Budget:: Status {
4
+ default := Budget:: Status.Pending;
5
+ };
6
+
7
+ universalTemplate: File;
8
+
9
+ records := .< budget[is Budget:: Record];
10
+ }
11
+ }
12
+
13
+ module Budget {
14
+ type Record extending Project:: Child {
15
+ constraint exclusive on ((.budget, .fiscalYear, .organization));
16
+
17
+ required fiscalYear: int16 {
18
+ readonly := true ;
19
+ };
20
+
21
+ amount: float32 ;
22
+
23
+ required budget: default :: Budget {
24
+ readonly := true ;
25
+ on target delete delete source ;
26
+ };
27
+
28
+ required organization: default :: Organization {
29
+ readonly := true ;
30
+ on target delete delete source ;
31
+ };
32
+ }
33
+
34
+ scalar type Status extending enum <
35
+ Pending,
36
+ Current ,
37
+ Superceded,
38
+ Rejected
39
+ > ;
40
+ }
You can’t perform that action at this time.
0 commit comments