export const category = pgTable('category', {
id,
name: text('name').notNull()
})
export const products = pgTable('product', {
id,
name: text('name').notNull(),
price: integer('price').notNull(),
description: text('description').notNull(),
categories: uuid('categories').array().references(() => category.id, { onDelete: 'set null' }),
// ...
})
export const category = pgTable('category', {
id,
name: text('name').notNull()
})
export const products = pgTable('product', {
id,
name: text('name').notNull(),
price: integer('price').notNull(),
description: text('description').notNull(),
categories: uuid('categories').array().references(() => category.id, { onDelete: 'set null' }),
// ...
})