Replace Revit CSV backend with Linear XLSX
This commit is contained in:
parent
52d3b1a270
commit
1cfeb06ec7
65 changed files with 4764 additions and 3717 deletions
|
|
@ -31,7 +31,6 @@ import {
|
|||
externalObjectAssignToNewCircuitCommandType,
|
||||
} from "../src/domain/models/external-object-new-circuit-project-command.model.js";
|
||||
import type { ExternalModelObjectSnapshot } from "../src/external-model/domain/external-model-contracts.js";
|
||||
import { externalCsvTestConfiguration } from "./fixtures/revit-csv-fixtures.js";
|
||||
|
||||
function createFixture(initialObjectRowId: string | null = "row-1") {
|
||||
const context = createDatabaseContext(":memory:");
|
||||
|
|
@ -63,20 +62,16 @@ function createFixture(initialObjectRowId: string | null = "row-1") {
|
|||
simultaneityFactor: 1,
|
||||
}).run();
|
||||
}
|
||||
database.insert(externalModelSources).values({ id: "source-1", projectId: "project-1", name: "Revit", sourceType: "revit_csv" }).run();
|
||||
database.insert(externalModelSources).values({ id: "source-1", projectId: "project-1", name: "Revit", sourceType: "revit_xlsx" }).run();
|
||||
database.insert(externalImportBatches).values({
|
||||
id: "batch-1",
|
||||
projectId: "project-1",
|
||||
sourceId: "source-1",
|
||||
importKind: "initial",
|
||||
importedAtIso: "2026-08-02T16:00:00.000Z",
|
||||
fileName: "revit.csv",
|
||||
fileName: "revit.xlsx",
|
||||
sha256: "a".repeat(64),
|
||||
appliedProjectRevision: 0,
|
||||
configurationVersion: 1,
|
||||
configurationSnapshot: externalCsvTestConfiguration,
|
||||
originalBytes: Buffer.from("test"),
|
||||
document: { delimiter: ";", encoding: "utf-8", headers: [], rows: [] },
|
||||
objectCount: 1,
|
||||
}).run();
|
||||
database.insert(externalRoomMappings).values({
|
||||
id: "mapping-1",
|
||||
|
|
@ -98,7 +93,9 @@ function objectSnapshot(circuitDeviceRowId: string | null): ExternalModelObjectS
|
|||
id: "object-1",
|
||||
projectId: "project-1",
|
||||
sourceId: "source-1",
|
||||
worksharingId: "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee-ffffffff",
|
||||
ifcGuid: "ifc-1",
|
||||
deviceTypeId: "device-type-1",
|
||||
lastSeenImportBatchId: "batch-1",
|
||||
lastAcceptedImportBatchId: "batch-1",
|
||||
acceptedSourceValues: {
|
||||
|
|
@ -107,14 +104,18 @@ function objectSnapshot(circuitDeviceRowId: string | null): ExternalModelObjectS
|
|||
roomName: "Büro",
|
||||
familyAndType: "Steckdose: Standard",
|
||||
selectionMarker: "Steckdose",
|
||||
socketCount: "2",
|
||||
sourceRemark: null,
|
||||
circuitCombined: "-2F1.1",
|
||||
boardName: "UV 1",
|
||||
circuitIdentifier: "-2F1.1",
|
||||
power: "120",
|
||||
quantity: "2",
|
||||
additionalSourceValues: {},
|
||||
designation: null,
|
||||
electricalPowerW: "120",
|
||||
voltageV: 230,
|
||||
currentA: null,
|
||||
},
|
||||
planningValues: {
|
||||
displayName: "Steckdose",
|
||||
internalDeviceType: "socket",
|
||||
category: "single_phase",
|
||||
connectionKind: "socket",
|
||||
effectiveQuantity: 2,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue