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.
67 lines
1.3 KiB
JavaScript
67 lines
1.3 KiB
JavaScript
module.exports = [{
|
|
mapId: 'imageMap',
|
|
idProperty: 'uuid',
|
|
properties: [
|
|
'featured',
|
|
'large_file',
|
|
'thumb_file',
|
|
'mime_type',
|
|
'date_uploaded'
|
|
],
|
|
associations: [
|
|
// TODO: Uploader should not be included in non-admin API responses
|
|
{name: 'uploader', mapId: 'userMap', columnPrefix: 'uploader_'}
|
|
]
|
|
},{
|
|
mapId: 'itemMap',
|
|
idProperty: 'uuid',
|
|
properties: [
|
|
'name',
|
|
'description',
|
|
'urlslug',
|
|
'price_cents',
|
|
'published',
|
|
'number_in_stock',
|
|
'preorder_availability_date',
|
|
'preorder_maximum',
|
|
'hs_tariff_number',
|
|
'customs_description',
|
|
'customs_origin_country',
|
|
'weight_oz'
|
|
],
|
|
collections: [
|
|
{name: 'images', mapId: 'imageMap', columnPrefix: 'image_'}
|
|
]
|
|
},{
|
|
mapId: 'bareImageMap',
|
|
idProperty: 'uuid',
|
|
properties: [
|
|
'mime_type',
|
|
'file'
|
|
]
|
|
},{
|
|
mapId: 'categoryMap',
|
|
idProperty: 'uuid',
|
|
properties: [
|
|
'name',
|
|
'description',
|
|
'urlslug'
|
|
],
|
|
associations: [
|
|
{name: 'parent', mapId: 'bareCategoryMap', columnPrefix: 'parent_category_'}
|
|
],
|
|
collections: [
|
|
{name: 'items', mapId: 'itemMap', columnPrefix: 'item_'},
|
|
{name: 'children', mapId: 'bareCategoryMap', columnPrefix: 'child_category_'}
|
|
]
|
|
},{
|
|
mapId: 'bareCategoryMap',
|
|
idProperty: 'uuid',
|
|
properties: [
|
|
'name',
|
|
'description',
|
|
'urlslug',
|
|
'item_count'
|
|
]
|
|
}]
|