2025-08-20 22:35:19 +02:00

29 lines
407 B
TypeScript

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[];
}