import { pgTable, text, timestamp, uuid } from 'drizzle-orm/pg-core'; export const orders = pgTable('orders', { id: uuid('id').primaryKey().defaultRandom(), orderRef: text('order_ref').notNull(), status: text('status').notNull().default('new'), axonautDestockedAt: timestamp('axonaut_destocked_at', { withTimezone: true }), axonautDestockError: text('axonaut_destock_error'), colissimoTrackingNumber: text('colissimo_tracking_number'), colissimoLabelUrl: text('colissimo_label_url'), colissimoShippedAt: timestamp('colissimo_shipped_at', { withTimezone: true }), colissimoError: text('colissimo_error'), amazonTrackingConfirmedAt: timestamp('amazon_tracking_confirmed_at', { withTimezone: true }), amazonTrackingError: text('amazon_tracking_error'), shippingName: text('shipping_name'), shippingFirstName: text('shipping_first_name'), shippingLastName: text('shipping_last_name'), shippingLine1: text('shipping_line1'), shippingLine2: text('shipping_line2'), shippingLine3: text('shipping_line3'), shippingCity: text('shipping_city'), shippingZipCode: text('shipping_zip_code'), shippingCountryCode: text('shipping_country_code'), shippingState: text('shipping_state'), shippingPhone: text('shipping_phone'), shippingAddressType: text('shipping_address_type'), shippingFetchedAt: timestamp('shipping_fetched_at', { withTimezone: true }), shippingFetchError: text('shipping_fetch_error'), createdAt: timestamp('created_at', { withTimezone: true }) .notNull() .defaultNow(), updatedAt: timestamp('updated_at', { withTimezone: true }) .notNull() .defaultNow() });