45 lines
1.1 KiB
TypeScript
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>
|
|
}
|