import { IsEmail, IsNotEmpty, IsOptional, IsString } from 'class-validator'; /// Team login accepts EITHER an email (legacy/personal Verantwortliche /// accounts) OR a Gemeinde name (the normal Teamer login path, since a /// Teamer thinks of their login as "meine Gemeinde", not their email). /// At least one of email/gemeindeName is required; enforced in the /// controller rather than a custom validator to keep this DTO simple. export class TeamLoginDto { @IsOptional() @IsEmail() email?: string; @IsOptional() @IsString() @IsNotEmpty() gemeindeName?: string; @IsString() @IsNotEmpty() password!: string; }