56 lines
1.4 KiB
JavaScript
56 lines
1.4 KiB
JavaScript
import { appendOnlyActions as actions } from "oak-domain/lib/actions/action";
|
|
export const desc = {
|
|
attributes: {
|
|
accountId: {
|
|
notNull: true,
|
|
type: "ref",
|
|
ref: "account"
|
|
},
|
|
type: {
|
|
notNull: true,
|
|
type: "enum",
|
|
enumeration: ["deposit", "withdraw", "consume", "consumeBack", "loan", "repay", "withdrawBack", "earn", "cutoffRefundable", "tax", "taxRefund", "refund", "refundFailure", "settle"]
|
|
},
|
|
totalPlus: {
|
|
notNull: true,
|
|
type: "money"
|
|
},
|
|
availPlus: {
|
|
notNull: true,
|
|
type: "money"
|
|
},
|
|
refundablePlus: {
|
|
type: "money"
|
|
},
|
|
total: {
|
|
notNull: true,
|
|
type: "money"
|
|
},
|
|
avail: {
|
|
notNull: true,
|
|
type: "money"
|
|
},
|
|
refundable: {
|
|
notNull: true,
|
|
type: "money"
|
|
},
|
|
entity: {
|
|
notNull: true,
|
|
type: "varchar",
|
|
params: {
|
|
length: 32
|
|
},
|
|
ref: ["deposit", "order", "pay", "refund", "settlement", "withdraw", "withdrawTransfer"]
|
|
},
|
|
entityId: {
|
|
notNull: true,
|
|
type: "varchar",
|
|
params: {
|
|
length: 64
|
|
}
|
|
}
|
|
},
|
|
actionType: "appendOnly",
|
|
actions
|
|
};
|