import {
  pgTable,
  text,
  integer,
  timestamp,
  jsonb,
  boolean
} from 'drizzle-orm/pg-core'

export const products = pgTable('products', {
  id: text('id').primaryKey().notNull(), // Stripe Product ID
  name: text('name').notNull(),
  description: text('description'),
  active: boolean('active').notNull().default(true),
  image: text('image'),
  metadata: jsonb('metadata'),
  product_orders: integer('product_orders').notNull().default(0),
  features: jsonb('features'),
  createdAt: timestamp('created_at').defaultNow(),
  updatedAt: timestamp('updated_at').defaultNow()
})
