17 lines
735 B
JavaScript
17 lines
735 B
JavaScript
import { pgTable, text, timestamp, uniqueIndex, uuid } from 'drizzle-orm/pg-core';
|
|
export const skuMappings = pgTable('sku_mappings', {
|
|
id: uuid('id').primaryKey().defaultRandom(),
|
|
amazonSku: text('amazon_sku').notNull(),
|
|
enterpriseSku: text('enterprise_sku').notNull(),
|
|
expectedFotaModel: text('expected_fota_model').notNull(),
|
|
axonautProductInternalId: text('axonaut_product_internal_id').notNull(),
|
|
createdAt: timestamp('created_at', { withTimezone: true })
|
|
.notNull()
|
|
.defaultNow(),
|
|
updatedAt: timestamp('updated_at', { withTimezone: true })
|
|
.notNull()
|
|
.defaultNow()
|
|
}, (t) => ({
|
|
amazonSkuUniqueIdx: uniqueIndex('sku_mappings_amazon_sku_unique').on(t.amazonSku)
|
|
}));
|