cboddeposit.app
cboddeposit/cboddeposit.app
Download original file · Bank deposit source contents
1domain cboddeposit;23application xbodDeposit {4environment develop {5deploy cboddeposit;6transactions {7mode: LOCAL;8resource: cashRecordsResource;9ordinaryUpdates: PARALLEL;10}11}12environment testing {13deploy cboddeposit;14quantum {15system: UNIFIED_STORE;16resource: cashLedger;17}18}19}2021requests {22idempotency retention 3 days;23duplicateWindow 5 seconds;24}2526header requestContext {27unique String globalSerialNumber;28String callerId;29String requestSerialNumber;30String callMode;31String callOrigin;32}3334header responseContext {35String status(Default = "OK");36}3738tables entities {39table BANK_ACCOUNTS(BankAccount) {40primarykey(BankAccount.accountNumber);41}42}4344tables roles {45table INTEREST_INCOME_ACCOUNTS(InterestIncomeAccount) {46primarykey(InterestIncomeAccount.accountNumber);47}48table COLLECTION_INCOME_ACCOUNTS(CollectionInterestIncomeAccount) {49primarykey(CollectionInterestIncomeAccount.accountNumber);50}51table PRINCIPAL_RECOVERY_ACCOUNTS(PrincipalRecoveryAccount) {52primarykey(PrincipalRecoveryAccount.accountNumber);53}54table CASH_REVERSAL_POSTINGS(CashReversalPostingLine) {55primarykey(CashReversalPostingLine.reversal, CashReversalPostingLine.slot);56foreignkey(CashReversalPostingLine.reversal) references CashReversalAgreement;57}58table ACCOUNT_ACCRUAL(DepositAccrualState) {59primarykey(DepositAccrualState.accountNumber);60}61table CASH_POSTINGS(DepositPostingLine) {62primarykey(DepositPostingLine.deposit, DepositPostingLine.slot);63foreignkey(DepositPostingLine.deposit) references CashDepositAgreement;64}65table DEPOSIT_ACCOUNTS(DepositAccount) {66primarykey(DepositAccount.accountNumber);67}68table CASH_SETTLEMENT_ACCOUNTS(CashSettlementAccount) {69primarykey(CashSettlementAccount.accountNumber);70}71table ACCOUNT_ELIGIBILITY(AccountEligibility) {72primarykey(AccountEligibility.accountNumber);73}74table FEE_RATES(DepositFeeRate) {75primarykey(DepositFeeRate.customerNumber, DepositFeeRate.tariff);76}77table CASH_FAILURES(CashFailureRecord) {78primarykey(CashFailureRecord.handlingNumber);79auto CashFailureRecord.handlingNumber prefix "FAILURE";80snapshot(CashFailureRecord.deposit, CashFailureRecord.reversal);81}82}8384tables contracts {85table CASH_DEPOSITS(CashDepositAgreement) {86snapshot(CashDepositAgreement.postingEvidence);87primarykey(CashDepositAgreement.depositNumber);88auto CashDepositAgreement.depositNumber prefix "DEPOSIT";89foreignkey(CashDepositAgreement.account) references DepositAccount;90foreignkey(CashDepositAgreement.settlement) references CashSettlementAccount;91foreignkey(CashDepositAgreement.interestIncome) references InterestIncomeAccount;92foreignkey(CashDepositAgreement.collectionIncome) references CollectionInterestIncomeAccount;93foreignkey(CashDepositAgreement.principalRecovery) references PrincipalRecoveryAccount;94}95table CASH_REVERSALS(CashReversalAgreement) {96primarykey(CashReversalAgreement.reversalNumber);97auto CashReversalAgreement.reversalNumber prefix "REVERSAL";98foreignkey(CashReversalAgreement.original) references CashDepositAgreement;99}100}101102scope {103local(in requestContext, out responseContext) {104quantum resource(105cashLedger,106DepositAccount.interestBase,107CashSettlementAccount.balance,108InterestIncomeAccount.balance,109CollectionInterestIncomeAccount.balance,110PrincipalRecoveryAccount.balance111) settleCashDeposit;112quantum resource(113cashLedger,114DepositAccount.interestBase,115CashSettlementAccount.balance,116InterestIncomeAccount.balance,117CollectionInterestIncomeAccount.balance,118PrincipalRecoveryAccount.balance119) reverseCashDeposit;120duplicate key(121DepositAccount.accountNumber,122CashSettlementAccount.accountNumber123) facts(124DepositRequest,125CashChannel,126DepositFeeParty,127DepositFeeContext,128AuthorizationEvidence,129InterestIncomeAccount,130CollectionInterestIncomeAccount,131PrincipalRecoveryAccount132) window 5 seconds depositCash;133duplicate key(134DepositAccount.accountNumber,135CashDepositAgreement.depositNumber136) facts(CashReversalAgreement) window 5 seconds reverseCash;137}138}139140web {141expose openBankRepaymentAccounts;142expose openDepositAccount;143expose depositCash;144expose reverseCash;145expose previewCashReversal;146expose readDepositAccount;147expose readCashDeposit;148expose readCashReversal;149}