12 lines
573 B
TypeScript
12 lines
573 B
TypeScript
import { integer, sqliteTable, text } from 'drizzle-orm/sqlite-core'
|
|
import { products } from './products'
|
|
import { drugInfo } from './drugInfo'
|
|
import { units } from './units'
|
|
|
|
export const productCompositions = sqliteTable('product_compositions', {
|
|
id: integer('id').primaryKey({ autoIncrement: true }),
|
|
productId: integer('product_id').notNull().references(() => products.id),
|
|
drugInfoId: integer('drug_info_id').notNull().references(() => drugInfo.id),
|
|
quantity: text('quantity').notNull(),
|
|
unitId: integer('unit_id').notNull().references(() => units.id),
|
|
})
|