component-dbs-core
Version:
DTO objects shared among device backend
171 lines (170 loc) • 4.54 kB
JavaScript
/* eslint-disable */
module.exports = {
port: 8001,
tables: [
{
TableName: `Devices`,
KeySchema: [
{ AttributeName: 'id', KeyType: 'HASH' },
{ AttributeName: 'type', KeyType: 'RANGE' },
],
AttributeDefinitions: [
{ AttributeName: 'id', AttributeType: 'S' },
{ AttributeName: 'type', AttributeType: 'S' },
{ AttributeName: 'modelSerial', AttributeType: 'S' },
{ AttributeName: 'transactionUuid', AttributeType: 'S' },
{ AttributeName: 'depositUuid', AttributeType: 'S' },
{ AttributeName: 'entityUuid', AttributeType: 'S' },
{ AttributeName: 'siteUuid', AttributeType: 'S' },
{ AttributeName: 'accessToken', AttributeType: 'S' },
],
BillingMode: 'PAY_PER_REQUEST',
GlobalSecondaryIndexes: [
{
IndexName: 'modelSerialGsi',
KeySchema: [
{
AttributeName: 'modelSerial',
KeyType: 'HASH',
},
{
AttributeName: 'type',
KeyType: 'RANGE',
},
],
Projection: {
NonKeyAttributes: ['model', 'serial'],
ProjectionType: 'INCLUDE',
},
},
{
IndexName: 'transactionGsi',
KeySchema: [
{
AttributeName: 'transactionUuid',
KeyType: 'HASH',
},
],
Projection: {
ProjectionType: 'ALL',
},
},
{
IndexName: 'depositGsi',
KeySchema: [
{
AttributeName: 'depositUuid',
KeyType: 'HASH',
}
],
Projection: {
NonKeyAttributes: [
'depositUuid',
'entityUuid',
'timestamp',
'status',
'dailyTotals',
'account',
'reference',
'totalAmount',
'feeAmount',
'refundsAmount',
'chargebacksAmount',
'owingAmount',
'adjustedAmount',
'depositAmount'
],
ProjectionType: 'INCLUDE'
},
},
{
IndexName: 'entityUuidGsi',
KeySchema: [
{
AttributeName: 'entityUuid',
KeyType: 'HASH',
},
{
AttributeName: 'type',
KeyType: 'RANGE',
},
],
Projection: {
NonKeyAttributes: [
'transactionUuid',
'scheme',
'timestamp',
'maskedPan',
'transactionType',
'reference',
'status',
'depositUuid',
'siteUuid',
'amount',
'dailySubtotal',
'depositAmount',
],
ProjectionType: 'INCLUDE',
},
},
{
IndexName: 'siteUuidGsi',
KeySchema: [
{
AttributeName: 'siteUuid',
KeyType: 'HASH',
},
{
AttributeName: 'type',
KeyType: 'RANGE',
},
],
Projection: {
NonKeyAttributes: [
'transactionUuid',
'scheme',
'timestamp',
'maskedPan',
'transactionType',
'reference',
'status',
'depositUuid',
'amount',
'dailySubtotal',
'depositAmount',
'model',
'serial',
'name',
],
ProjectionType: 'INCLUDE',
},
},
{
IndexName: 'accessTokenGsi',
KeySchema: [
{
AttributeName: 'accessToken',
KeyType: 'HASH',
},
],
Projection: {
NonKeyAttributes: ['id', 'siteUuid', 'entityUuid', 'status'],
ProjectionType: 'INCLUDE',
},
},
],
},
{
TableName: `Sites`,
KeySchema: [
{ AttributeName: 'entityUuid', KeyType: 'HASH' },
{ AttributeName: 'siteUuid', KeyType: 'RANGE' },
],
AttributeDefinitions: [
{ AttributeName: 'entityUuid', AttributeType: 'S' },
{ AttributeName: 'siteUuid', AttributeType: 'S' },
],
BillingMode: 'PAY_PER_REQUEST',
},
],
};