first commit
This commit is contained in:
14
src/edge/dto/edge-response.dto.ts
Normal file
14
src/edge/dto/edge-response.dto.ts
Normal file
@@ -0,0 +1,14 @@
|
||||
export type EdgeItemDto = {
|
||||
id: string;
|
||||
name: string;
|
||||
parentId: string | null;
|
||||
tagIds: string[];
|
||||
tagCount: number;
|
||||
currentTagCount: number;
|
||||
liveTagCount: number;
|
||||
lastDataAt: Date | null;
|
||||
};
|
||||
|
||||
export type EdgeResponseDto = {
|
||||
items: EdgeItemDto[];
|
||||
};
|
||||
15
src/edge/dto/get-edges.dto.ts
Normal file
15
src/edge/dto/get-edges.dto.ts
Normal file
@@ -0,0 +1,15 @@
|
||||
import { Transform } from 'class-transformer';
|
||||
import { IsOptional, IsString } from 'class-validator';
|
||||
import { normalizeOptionalText } from '../../common/normalize-text';
|
||||
|
||||
export class GetEdgesDto {
|
||||
@IsOptional()
|
||||
@Transform(({ value }) => normalizeOptionalText(value))
|
||||
@IsString()
|
||||
parentId?: string;
|
||||
|
||||
@IsOptional()
|
||||
@Transform(({ value }) => normalizeOptionalText(value))
|
||||
@IsString()
|
||||
search?: string;
|
||||
}
|
||||
Reference in New Issue
Block a user