Skip to content

Commit

Permalink
Create Budget and BudgetRecord schemas
Browse files Browse the repository at this point in the history
  • Loading branch information
bryanjnelson committed Nov 15, 2023
1 parent e0565a6 commit f2abe03
Showing 1 changed file with 40 additions and 0 deletions.
40 changes: 40 additions & 0 deletions dbschema/budget.esdl
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
>;
}

0 comments on commit f2abe03

Please sign in to comment.