import { IsArray, IsEmail, IsEnum, IsOptional, IsString, MaxLength, MinLength } from 'class-validator'

export class CreateUserDto {
  @IsString() @MinLength(1)
  authentikSubjectId!: string

  @IsEmail()
  email!: string

  @IsString() @MinLength(1) @MaxLength(200)
  name!: string

  @IsOptional() @IsArray() @IsString({ each: true })
  tenantSlugs?: string[]

  @IsOptional() @IsEnum(['owner', 'admin', 'member'])
  role?: 'owner' | 'admin' | 'member'
}
