mirror of
https://github.com/Hestia-Homes/assessment-model.git
synced 2026-06-08 11:37:25 +00:00
added file type and file source columns and enums
This commit is contained in:
parent
f1bbad9ceb
commit
c7fd09fb78
1 changed files with 22 additions and 2 deletions
|
|
@ -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")
|
||||
}
|
||||
);
|
||||
Loading…
Add table
Reference in a new issue