import { Group } from './group'; import { IsEmail, IsNotEmpty, MinLength, ValidateNested, } from 'class-validator'; export class Account { id: string; @MinLength(3) accountName: string; @MinLength(3) passwordHash: string; @IsEmail() email: string; emailVerified: boolean; active: boolean; @IsNotEmpty({ each: true }) @ValidateNested({ each: true }) groups: Group[]; }