Rewrite frontend, added rooms, voltage selection per project, startet with todos
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
import { integer, real, sqliteTable, text } from "drizzle-orm/sqlite-core";
|
||||
import { circuitLists } from "./circuit-lists.js";
|
||||
import { distributionBoards } from "./distribution-boards.js";
|
||||
import { projects } from "./projects.js";
|
||||
import { rooms } from "./rooms.js";
|
||||
|
||||
export const consumers = sqliteTable("consumers", {
|
||||
id: text("id").primaryKey(),
|
||||
@@ -10,8 +12,26 @@ export const consumers = sqliteTable("consumers", {
|
||||
distributionBoardId: text("distribution_board_id").references(() => distributionBoards.id, {
|
||||
onDelete: "set null",
|
||||
}),
|
||||
circuitListId: text("circuit_list_id").references(() => circuitLists.id, {
|
||||
onDelete: "set null",
|
||||
}),
|
||||
roomId: text("room_id").references(() => rooms.id, {
|
||||
onDelete: "set null",
|
||||
}),
|
||||
circuitNumber: text("circuit_number"),
|
||||
description: text("description"),
|
||||
name: text("name").notNull(),
|
||||
category: text("category"),
|
||||
deviceType: text("device_type"),
|
||||
phaseType: text("phase_type"),
|
||||
tradeOrCostGroup: text("trade_or_cost_group"),
|
||||
group: text("group_name"),
|
||||
protectionType: text("protection_type"),
|
||||
protectionRatedCurrent: real("protection_rated_current"),
|
||||
protectionCharacteristic: text("protection_characteristic"),
|
||||
cableType: text("cable_type"),
|
||||
cableCrossSection: text("cable_cross_section"),
|
||||
comment: text("comment"),
|
||||
quantity: integer("quantity").notNull(),
|
||||
installedPowerPerUnitKw: real("installed_power_per_unit_kw").notNull(),
|
||||
demandFactor: real("demand_factor").notNull(),
|
||||
@@ -20,4 +40,3 @@ export const consumers = sqliteTable("consumers", {
|
||||
powerFactor: real("power_factor"),
|
||||
note: text("note"),
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user