first commit
This commit is contained in:
16
src/ingest/dto/ingest-edge-values.dto.ts
Normal file
16
src/ingest/dto/ingest-edge-values.dto.ts
Normal file
@@ -0,0 +1,16 @@
|
||||
import { Type } from 'class-transformer';
|
||||
import { IsDateString, IsNumber, IsObject, IsOptional } from 'class-validator';
|
||||
|
||||
export class IngestEdgeValuesDto {
|
||||
@IsOptional()
|
||||
@IsDateString()
|
||||
time?: string;
|
||||
|
||||
@IsOptional()
|
||||
@Type(() => Number)
|
||||
@IsNumber()
|
||||
timestamp?: number;
|
||||
|
||||
@IsObject()
|
||||
values!: Record<string, number>;
|
||||
}
|
||||
25
src/ingest/dto/ingest-point.dto.ts
Normal file
25
src/ingest/dto/ingest-point.dto.ts
Normal file
@@ -0,0 +1,25 @@
|
||||
import { Type } from 'class-transformer';
|
||||
import { IsDateString, IsNotEmpty, IsNumber, IsOptional, IsString } from 'class-validator';
|
||||
|
||||
export class IngestPointDto {
|
||||
@IsNotEmpty()
|
||||
@IsString()
|
||||
edge!: string;
|
||||
|
||||
@IsNotEmpty()
|
||||
@IsString()
|
||||
tag!: string;
|
||||
|
||||
@IsOptional()
|
||||
@IsDateString()
|
||||
time?: string;
|
||||
|
||||
@IsOptional()
|
||||
@Type(() => Number)
|
||||
@IsNumber()
|
||||
timestamp?: number;
|
||||
|
||||
@Type(() => Number)
|
||||
@IsNumber()
|
||||
value!: number;
|
||||
}
|
||||
Reference in New Issue
Block a user