import { pgTable, bigserial, bigint, text, real } from "drizzle-orm/pg-core";
import { magicPlanFloor } from "./floor";

export const magicPlanRoom = pgTable(
  "magic_plan_room",
  {
    id:       bigserial("id", { mode: "bigint" }).primaryKey(),
    floorId:  bigint("magic_plan_floor_id", { mode: "bigint" })
      .notNull()
      .references(() => magicPlanFloor.id),
    name:     text("name"),
    widthM:  real("width_m"),
    lengthM: real("length_m"),
    areaM2:  real("area_m2"),
  },
);