Schema to type
Hey guys, how do you make a schema item as a static type ?
for example, this thing:
as
for example, this thing:
as
export const orderItems = pgTable("orderItem", {
product_id: serial("product_id").notNull(),
order_id: serial("order_id").notNull(),
quantity: integer("quantity")
},
(orderItems) => ({
compoundKey: primaryKey(orderItems.product_id, orderItems.order_id),
}
)){
productId: number,
order_id: number,
quantity: number
}