component-dbs-core
Version:
DTO objects shared among device backend
38 lines • 1.48 kB
JavaScript
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.unmarshallTransaction = exports.marshallTransaction = void 0;
const dynamodb_data_marshaller_1 = require("@aws/dynamodb-data-marshaller");
const transactionTableSchema = {
id: { type: 'String' },
type: { type: 'String' },
transactionUuid: { type: 'String' },
entityUuid: { type: 'String' },
siteUuid: { type: 'String' },
timestamp: { type: 'String' },
amount: { type: 'Number' },
saleAmount: { type: 'Number' },
taxAmounts: {
type: 'List',
memberType: {
type: 'Document',
members: { name: { type: 'String' }, amount: { type: 'Number' } },
},
},
scheme: { type: 'String' },
transactionType: { type: 'String' },
status: { type: 'String' },
maskedPan: { type: 'String' },
reference: { type: 'String' },
deviceName: { type: 'String' },
siteName: { type: 'String' },
tipAmount: { type: 'Number' },
feeAmount: { type: 'Number' },
surchargeAmount: { type: 'Number' },
depositUuid: { type: 'String' },
depositDate: { type: 'String' },
panToken: { type: 'String' },
par: { type: 'String' },
};
exports.marshallTransaction = (data) => dynamodb_data_marshaller_1.marshallItem(transactionTableSchema, data);
exports.unmarshallTransaction = (data) => dynamodb_data_marshaller_1.unmarshallItem(transactionTableSchema, data);
//# sourceMappingURL=tableSchema.js.map