[chore] sales history schema
This commit is contained in:
@@ -109,6 +109,21 @@ export const priceHistory = pokeSchema.table('price_history', {
|
||||
primaryKey({ name: 'pk_price_history', columns: [table.skuId, table.calculatedAt] })
|
||||
]);
|
||||
|
||||
export const salesHistory = pokeSchema.table('sales_history',{
|
||||
skuId: integer().notNull(),
|
||||
orderDate: timestamp().notNull(),
|
||||
title: varchar({ length: 255 }),
|
||||
customListingId: varchar({ length: 255 }),
|
||||
language: varchar({ length: 100 }),
|
||||
listingType: varchar({ length: 100 }),
|
||||
purchasePrice: decimal({ precision: 10, scale: 2 }),
|
||||
quantity: integer(),
|
||||
shippingPrice: decimal({ precision: 10, scale: 2 })
|
||||
},
|
||||
(table) => [
|
||||
primaryKey({ name: 'pk_sales_history', columns: [table.skuId, table.orderDate] })
|
||||
]);
|
||||
|
||||
export const processingSkus = pokeSchema.table('processing_skus', {
|
||||
skuId: integer().primaryKey(),
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user