Skip to content

Commit

Permalink
Add Lineage and status to Confirmation and Affirmation objects (#491)
Browse files Browse the repository at this point in the history
  • Loading branch information
hugohills-regnosys authored Sep 16, 2019
1 parent e0761db commit 7822915
Showing 1 changed file with 28 additions and 13 deletions.
41 changes: 28 additions & 13 deletions src/main/rosetta/model-cdm-event-confirmation.rosetta
Original file line number Diff line number Diff line change
Expand Up @@ -3,24 +3,39 @@ version "${project.version}"

class Confirmation <"A class to specify a trade confirmation.">
{
identifier Identifier (1..*) <"The identifier(s) associated with the trade and resulting confirmation.">;
party Party (0..*) <"The parties associated with the trade.">;
partyRole PartyRole (0..*) <"The role(s) that party(ies) may have in relation to the trade">;
execution Execution (0..1) reference <"Reference to the execution associated with the confirmation">
identifier Identifier (1..*) <"The identifier(s) associated with the trade and resulting confirmation.">;
party Party (1..*) <"The parties associated with the trade.">;
partyRole PartyRole (1..*) <"The role(s) that party(ies) may have in relation to the trade">;
lineage Lineage (0..1) <"The lineage attribute provides a linkage to previous lifecycle events and associated data.">;
status ConfirmationStatusEnum (1..1);
}

enum ConfirmationStatusEnum <"Enumeration for the different types of confirmation status.">
{
Confirmed,
Unconfirmed
}

data rule Confirmation_partyRole_buyerSeller <"For an security confirmation, both buyer and seller party roles must exist.">
when Confirmation -> execution -> product -> security exists
then Confirmation -> partyRole -> role contains PartyRoleEnum.Buyer and Confirmation -> partyRole -> role contains PartyRoleEnum.Seller

when Confirmation -> lineage -> executionReference -> product -> security exists
then Confirmation -> partyRole -> role contains PartyRoleEnum.Buyer or Confirmation -> partyRole -> role contains PartyRoleEnum.Seller
class Affirmation <"A class to specify a trade affirmation.">
{
identifier Identifier (1..*) <"The identifier(s) associated with the trade and resulting confirmation.">;
party Party (0..*) <"The parties associated with the trade.">;
partyRole PartyRole (0..*) <"The role(s) that party(ies) may have in relation to the trade">;
execution Execution (0..1) reference <"Reference to the execution associated with the confirmation">
identifier Identifier (1..*) <"The identifier(s) associated with the trade and resulting confirmation.">;
party Party (1..*) <"The parties associated with the trade.">;
partyRole PartyRole (1..*) <"The role(s) that party(ies) may have in relation to the trade">;
lineage Lineage (0..1) <"The lineage attribute provides a linkage to previous lifecycle events and associated data.">;
status AffirmationStatusEnum (1..1);
}

enum AffirmationStatusEnum <"Enumeration for the different types of affirmation status.">
{
Affirmed,
Unaffirmed
}

data rule Affirmation_partyRole_buyerSeller <"For an security affirmation, both buyer and seller party roles must exist.">
when Affirmation -> execution -> product -> security exists
then Affirmation -> partyRole -> role contains PartyRoleEnum.Buyer and Affirmation -> partyRole -> role contains PartyRoleEnum.Seller
when Affirmation -> lineage -> executionReference -> product -> security exists
then Affirmation -> partyRole -> role contains PartyRoleEnum.Buyer or Affirmation -> partyRole -> role contains PartyRoleEnum.Seller

0 comments on commit 7822915

Please sign in to comment.