You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

78 lines
1.6 KiB
JavaScript

module.exports = [{
mapId: 'orderMap',
idProperty: 'uuid',
properties: [
'number',
'start_time'
],
associations: [
{name: 'user', mapId: 'userMap', columnPrefix: 'user_'},
{name: 'address', mapId: 'addressMap', columnPrefix: 'address_'}
],
collections: [
{name: 'transactions', mapId: 'transactionMap', columnPrefix: 'transaction_'}
]
},{
mapId: 'transactionMap',
idProperty: 'uuid',
properties: [
'start_time',
'completion_time',
'payment_state',
'item_total_price',
'coupon_effective_discount',
'shipping_price',
'tax_price'
],
associations: [
{name: 'cart', mapId: 'cartMap', columnPrefix: 'cart_'},
{name: 'coupon', mapId: 'couponMap', columnPrefix: 'coupon_'},
{name: 'payment', mapId: 'paymentMap', columnPrefix: 'payment_'}
]
},{
mapId: 'addressMap',
idProperty: 'uuid',
properties: [
'name',
'company',
'street1',
'street2',
'city',
'state',
'zip',
'country',
'phone',
'easypost_id'
]
},{
mapId: 'couponMap',
idProperty: 'uuid',
properties: [
'code',
'valid_until',
'free_shipping',
'number_allowed_uses',
'flat_discount_cents',
'percent_discount',
'per_sock_discount_cents',
'number_of_socks_free'
]
},{
mapId: 'paymentMap',
idProperty: 'uuid',
properties: [
'type',
'time',
'value_cents'
],
associations: [
{name: 'stripe', mapId: 'paymentStripeMap', columnPrefix: 'stripe_'}
]
},{
mapId: 'paymentStripeMap',
idProperty: 'payment_intent_id',
properties: [
'reciept_email'
]
}]