Files
rk-backend/src/_dto/element.dto.ts
T
2026-08-31 16:19:06 +02:00

45 lines
1.1 KiB
TypeScript

import { Types } from "mongoose";
import { PeripherieDto } from "./peripherie.dto";
import { GroupSubElementDto } from "./group.dto";
export class ElementDto {
id!:Types.ObjectId;
anlageId!: Types.ObjectId;
name!:string;
prefix?: string;
funcTxt?: string;
excelNr!:number;
excelListe!:"Aggregate" | "Sensoren" | "Analogwerte" | "AnlagenVisu";
type!: "unbekannt" |"Motor" | "Ventil" | "Analog" | "Sensor";
options!:Record<string,boolean|string|number>;
group!:GroupSubElementDto;
}
export class ElementCreateDto {
anlageId!: Types.ObjectId;
groupId?: Types.ObjectId;
name!:string;
prefix?: string;
funcTxt?: string;
excelNr?:number;
excelListe?:"Aggregate" | "Sensoren" | "Analogwerte"
type!: "unbekannt" |"Motor" | "Ventil" | "Analog" | "Sensor"
options?:Record<string,boolean|string|number>
}
export class ElementUpdateDto {
anlageId?: Types.ObjectId;
groupId?: Types.ObjectId;
name?:string;
prefix?: string;
funcTxt?: string;
excelNr?:number;
excelListe?:"Aggregate" | "Sensoren" | "Analogwerte"
type?: "unbekannt" |"Motor" | "Ventil" | "Analog" | "Sensor"
options?:Record<string,boolean|string|number>
}