26 lines
440 B
TypeScript
26 lines
440 B
TypeScript
import { AutoMap } from '@automapper/classes';
|
|
import { IsEnum, IsNotEmpty, IsString } from 'class-validator';
|
|
import { Type } from './type.enum';
|
|
|
|
export class CreateAuthenticationRequest {
|
|
@IsString()
|
|
@IsNotEmpty()
|
|
@AutoMap()
|
|
uuid: string;
|
|
|
|
@IsString()
|
|
@IsNotEmpty()
|
|
@AutoMap()
|
|
username: string;
|
|
|
|
@IsString()
|
|
@IsNotEmpty()
|
|
@AutoMap()
|
|
password: string;
|
|
|
|
@IsEnum(Type)
|
|
@IsNotEmpty()
|
|
@AutoMap()
|
|
type: Type;
|
|
}
|