import { InferInsertModel, InferSelectModel } from "drizzle-orm";
import {
  pgTable,
  bigserial,
  bigint,
  date,
  text,
} from "drizzle-orm/pg-core";

export const propertyConditionSurvey = pgTable("property_condition_survey", {
  id: bigserial("id", { mode: "bigint" }).primaryKey(),

  uprn: bigint("uprn", { mode: "number" }).notNull(),

  date: date("date").notNull(),
  source: text("source").notNull(),
});

export type PropertyConditionSurveyRow =
  InferSelectModel<typeof propertyConditionSurvey>;

export type NewPropertyConditionSurveyRow =
  InferInsertModel<typeof propertyConditionSurvey>;