import { pgTable, bigserial, bigint, real } from "drizzle-orm/pg-core";
import { magicPlanDoor } from "./door";

export const magicPlanDoorVentilation = pgTable(
  "magic_plan_door_ventilation",
  {
    id:         bigserial("id", { mode: "bigint" }).primaryKey(),
    doorId:     bigint("magic_plan_door_id", { mode: "bigint" })
      .notNull()
      .unique()
      .references(() => magicPlanDoor.id, { onDelete: "cascade" }),
    undercutMm: real("undercut_mm"),
  },
);
