2022-03-03 13:38:39 +01:00
|
|
|
import { Exclude } from 'class-transformer';
|
2022-03-12 15:10:22 +01:00
|
|
|
import {
|
2022-03-12 16:25:15 +01:00
|
|
|
IsArray, IsInt, IsNotEmpty,
|
2022-03-12 15:10:22 +01:00
|
|
|
IsOptional,
|
|
|
|
|
IsString
|
|
|
|
|
} from 'class-validator';
|
|
|
|
|
import { Roles } from '../dto/roles.dto';
|
2022-02-26 16:06:32 +01:00
|
|
|
|
|
|
|
|
export class EUser {
|
2022-02-26 18:16:28 +01:00
|
|
|
@IsOptional()
|
2022-03-12 16:25:15 +01:00
|
|
|
@IsInt()
|
2022-02-26 18:16:28 +01:00
|
|
|
id?: number;
|
2022-02-26 16:06:32 +01:00
|
|
|
|
|
|
|
|
@IsNotEmpty()
|
2022-03-12 16:25:15 +01:00
|
|
|
@IsString()
|
2022-02-26 16:06:32 +01:00
|
|
|
username: string;
|
|
|
|
|
|
2022-03-10 23:02:27 +01:00
|
|
|
@IsArray()
|
2022-03-12 15:10:22 +01:00
|
|
|
@IsString({ each: true })
|
2022-03-10 23:02:27 +01:00
|
|
|
roles: Roles;
|
2022-02-26 16:06:32 +01:00
|
|
|
|
|
|
|
|
@IsOptional()
|
2022-02-26 18:16:28 +01:00
|
|
|
@Exclude()
|
2022-03-12 16:25:15 +01:00
|
|
|
@IsString()
|
2022-02-26 16:06:32 +01:00
|
|
|
password?: string;
|
|
|
|
|
}
|