[chore] move inventory relationship to sku
This commit is contained in:
@@ -129,15 +129,14 @@ export const inventory = pokeSchema.table('inventory',{
|
||||
inventoryId: uuid().primaryKey().notNull().defaultRandom(),
|
||||
userId: varchar({ length: 100 }).notNull(),
|
||||
catalogName: varchar({ length: 100 }),
|
||||
cardId: integer().notNull(),
|
||||
condition: varchar({ length: 255 }).notNull(),
|
||||
skuId: integer().notNull(),
|
||||
quantity: integer(),
|
||||
purchasePrice: decimal({ precision: 10, scale: 2 }),
|
||||
note: varchar({ length:255 }),
|
||||
createdAt: timestamp().notNull().defaultNow(),
|
||||
},
|
||||
(table) => [
|
||||
index('idx_userid_cardid').on(table.userId, table.cardId)
|
||||
index('idx_userid_skuId').on(table.userId, table.skuId)
|
||||
]);
|
||||
|
||||
export const processingSkus = pokeSchema.table('processing_skus', {
|
||||
|
||||
Reference in New Issue
Block a user