mirror of
https://github.com/Hestia-Homes/assessment-model.git
synced 2026-06-30 12:55:02 +00:00
adding fields to energy assessment document
This commit is contained in:
parent
42d56835be
commit
e5a00d4454
1 changed files with 9 additions and 0 deletions
|
|
@ -148,6 +148,7 @@ export const DocumentType: [string, ...string[]] = [
|
|||
"Evidence Report",
|
||||
"Summary Information",
|
||||
"Floor Plan",
|
||||
"Scenario EPR",
|
||||
];
|
||||
|
||||
export const DocumentTypeEnum = pgEnum("document_type", DocumentType);
|
||||
|
|
@ -156,11 +157,19 @@ export const energyAssessmentDocuments = pgTable(
|
|||
"energy_assessment_documents",
|
||||
{
|
||||
id: bigserial("id", { mode: "bigint" }).primaryKey(),
|
||||
uprn: bigint("uprn", { mode: "bigint" }).notNull(),
|
||||
energyAssessmentId: bigint("energy_assessment_id", {
|
||||
mode: "bigint",
|
||||
}).notNull(),
|
||||
documentType: DocumentTypeEnum("document_type").notNull(),
|
||||
documentLocation: text("document_location").notNull(),
|
||||
// The uploaded at date is automatically created when a new record is added
|
||||
uploadedAt: timestamp("uploaded_at", {
|
||||
precision: 6,
|
||||
withTimezone: true,
|
||||
})
|
||||
.notNull()
|
||||
.defaultNow(),
|
||||
}
|
||||
);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue