import { IsEmail, IsNotEmpty, IsOptional, IsString, IsEnum } from 'class-validator';
import { user_role } from '@prisma/client';

export class CreateUserDto {
    @IsEmail()
    @IsNotEmpty()
    email: string;

    @IsString()
    @IsNotEmpty()
    password: string;

    @IsString()
    @IsOptional()
    name?: string;

    @IsEnum(user_role)
    @IsOptional()
    role?: user_role;

    @IsString()
    @IsOptional()
    managerId?: string;

    @IsString()
    @IsOptional()
    permissions?: string;
}
