added file type and file source columns and enums

This commit is contained in:
Daniel Roth 2026-03-26 15:14:15 +00:00
parent f1bbad9ceb
commit c7fd09fb78

View file

@ -1,4 +1,22 @@
import { bigint, bigserial, pgTable, text, timestamp } from "drizzle-orm/pg-core";
import { bigint, bigserial, pgEnum, pgTable, text, timestamp } from "drizzle-orm/pg-core";
export const fileType = pgEnum("file_type", [
"photo_pack",
"site_note",
"rd_sap_site_note",
"pas_2023_ventilation",
"pas_2023_condition",
"pas_significance",
"par_photo_pack",
"pas_2023_property",
"pas_2023_occupancy"
]);
export const fileSource = pgEnum("file_source", [
"pas hub",
"sharepoint",
"hubspot"
]);
export const uploadedFiles = pgTable(
"uploaded_files",
@ -11,6 +29,8 @@ export const uploadedFiles = pgTable(
}).notNull(),
landlordPropertyId: text("landlord_property_id"),
uprn: bigint("uprn", { mode: "bigint" }),
hubspotListingId: bigint("hubspot_listing_id", { mode: "bigint" })
hubspotListingId: bigint("hubspot_listing_id", { mode: "bigint" }),
fileType: fileType("file_type"),
source: fileSource("file_source")
}
);