mirror of
https://github.com/Hestia-Homes/assessment-model.git
synced 2026-06-30 12:55:02 +00:00
add typescript type inference
This commit is contained in:
parent
4cd80cea71
commit
c35b53d186
3 changed files with 8 additions and 1 deletions
|
|
@ -32,4 +32,6 @@ export const aspectType = pgEnum("aspect_type", [
|
|||
"construction_type",
|
||||
"classification",
|
||||
"system",
|
||||
]);
|
||||
]);
|
||||
|
||||
export type AspectType = typeof aspectType.enumValues[number];
|
||||
|
|
@ -9,6 +9,7 @@ import {
|
|||
} from "drizzle-orm/pg-core";
|
||||
import { element } from "./element";
|
||||
import { aspectType } from "./aspect_type";
|
||||
import { InferSelectModel } from "drizzle-orm";
|
||||
|
||||
|
||||
export const assetCondition = pgTable(
|
||||
|
|
@ -35,3 +36,5 @@ export const assetCondition = pgTable(
|
|||
.on(t.uprn, t.element, t.aspectType, t.elementInstance),
|
||||
]
|
||||
);
|
||||
|
||||
export type AssetConditionRow = InferSelectModel<typeof assetCondition>;
|
||||
|
|
|
|||
|
|
@ -202,3 +202,5 @@ export const element = pgEnum("element", [
|
|||
"hhsrs_structural_collapse",
|
||||
"hhsrs_amenities",
|
||||
]);
|
||||
|
||||
export type Element = typeof element.enumValues[number];
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue