icydns/src/types/dto/create-record.dto.ts

25 lines
563 B
TypeScript
Raw Normal View History

2022-11-06 11:52:54 +00:00
import { ApiProperty } from '@nestjs/swagger';
import { DNSRecordType } from '../dns.enum';
export class CreateRecordDataDto {
@ApiProperty({
required: false,
description: 'When specified, will be inserted at this index.',
})
index?: number;
@ApiProperty({ required: true })
name: string;
@ApiProperty({ required: true, type: 'string' })
type: DNSRecordType;
@ApiProperty({ required: true })
value: string;
}
export class CreateRecordDto {
@ApiProperty({ required: true })
record: CreateRecordDataDto | CreateRecordDataDto[];
}