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.

93 lines
1.9 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_'},
{name: 'delivery', mapId: 'deliveryMap', columnPrefix: 'delivery_'}
],
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_'}
],
collections: [
{name: 'payments', 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'
]
},{
mapId: 'deliveryMap',
idProperty: 'uuid',
properties: [
'type',
'tracking_number',
'price_cents',
'date_shipped',
'easypost_id',
'description',
'date_delivered'
]
}]