component-dbs-core
Version:
DTO objects shared among device backend
30 lines • 1.19 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.unmarshallDeposit = exports.marshallDeposit = void 0;
const dynamodb_data_marshaller_1 = require("@aws/dynamodb-data-marshaller");
const depositTableSchema = {
id: { type: 'String' },
depositUuid: { type: 'String' },
entityUuid: { type: 'String' },
timestamp: { type: 'String' },
status: { type: 'String' },
dailyTotals: {
type: 'List',
memberType: {
type: 'Document',
members: { date: { type: 'String' }, amount: { type: 'Number' } },
},
},
account: { type: 'String' },
reference: { type: 'String' },
totalAmount: { type: 'Number' },
feeAmount: { type: 'Number' },
refundsAmount: { type: 'Number' },
chargeBacksAmount: { type: 'Number' },
owingAmount: { type: 'Number' },
adjustedAmount: { type: 'Number' },
depositAmount: { type: 'Number' },
};
exports.marshallDeposit = (data) => dynamodb_data_marshaller_1.marshallItem(depositTableSchema, data);
exports.unmarshallDeposit = (data) => dynamodb_data_marshaller_1.unmarshallItem(depositTableSchema, data);
//# sourceMappingURL=tableSchema.js.map