-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Create
Budget
and BudgetRecord
schemas
- Loading branch information
1 parent
e0565a6
commit f2abe03
Showing
1 changed file
with
40 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
module default { | ||
type Budget extending Project::Child { | ||
required status: Budget::Status { | ||
default := Budget::Status.Pending; | ||
}; | ||
|
||
single universalTemplate: File; | ||
records := .<budget[is Budget::Record]; | ||
} | ||
} | ||
|
||
module Budget { | ||
type Record extending Project::Child { | ||
constraint exclusive on ((.budget, .fiscalYear)); | ||
|
||
required fiscalYear: int16 { | ||
readonly := true; | ||
}; | ||
|
||
amount: float32; | ||
|
||
required budget: default::Budget { | ||
readonly := true; | ||
on target delete delete source; | ||
}; | ||
|
||
#TODO - pending completion of Organization | ||
# required organization: Organization { | ||
# constraint exclusive; # move up to constraint syntax above | ||
# readonly := true; | ||
#}; | ||
} | ||
|
||
scalar type Status extending enum< | ||
Pending, | ||
Current, | ||
Superceded, | ||
Rejected | ||
>; | ||
} |