export const order_phases = pgTable(
"Order_Phases",
{
id: serial("ID").notNull().primaryKey(),
restaurant_id: integer("Restaurant_ID")
.notNull()
.references(() => restaurants.id, { onDelete: "cascade" }),
uuid: uuid("UUID").defaultRandom().unique(),
name: text("Name").notNull(),
from: text("From").notNull(),
to: text("To").notNull(),
delivery_time: text("Delivery_Time").notNull(),
},
(t) => ({
unq: unique().on(t.restaurant_id, t.name),
})
);
export const order_phases = pgTable(
"Order_Phases",
{
id: serial("ID").notNull().primaryKey(),
restaurant_id: integer("Restaurant_ID")
.notNull()
.references(() => restaurants.id, { onDelete: "cascade" }),
uuid: uuid("UUID").defaultRandom().unique(),
name: text("Name").notNull(),
from: text("From").notNull(),
to: text("To").notNull(),
delivery_time: text("Delivery_Time").notNull(),
},
(t) => ({
unq: unique().on(t.restaurant_id, t.name),
})
);