31 lines
739 B
TypeScript
31 lines
739 B
TypeScript
import { ApiProperty } from '@nestjs/swagger';
|
|
import { IsBoolean, IsIn, IsNotEmpty, IsOptional, IsString } from 'class-validator';
|
|
|
|
export class DispositivoDto {
|
|
@ApiProperty({ description: 'Token FCM del dispositivo' })
|
|
@IsString()
|
|
@IsNotEmpty()
|
|
token: string;
|
|
|
|
@ApiProperty({ enum: ['android', 'ios', 'web'], default: 'android' })
|
|
@IsIn(['android', 'ios', 'web'])
|
|
@IsOptional()
|
|
plataforma?: string;
|
|
|
|
@ApiProperty({ required: false, default: true })
|
|
@IsBoolean()
|
|
@IsOptional()
|
|
activo?: boolean;
|
|
}
|
|
|
|
export class UpdateDispositivoDto {
|
|
@ApiProperty({ required: false })
|
|
@IsBoolean()
|
|
@IsOptional()
|
|
activo?: boolean;
|
|
|
|
@ApiProperty({ required: false })
|
|
@IsString()
|
|
@IsOptional()
|
|
plataforma?: string;
|
|
}
|