import { IsArray, IsDateString, IsInt, IsNotEmpty, IsOptional, IsString, Min, } from 'class-validator'; import { Type } from 'class-transformer'; export class GenerateLicenseDto { @Type(() => Number) @IsInt() customerId!: number; @IsString() @IsNotEmpty() company!: string; @IsString() @IsNotEmpty() machineFingerprint!: string; @IsString() @IsNotEmpty() edition!: string; @IsDateString() expiresAt!: string; @IsArray() @IsString({ each: true }) features!: string[]; @Type(() => Number) @IsInt() @Min(1) @IsOptional() maxCompanies?: number; } export class LicenseQueryDto { @Type(() => Number) @IsInt() @Min(1) @IsOptional() page?: number = 1; @Type(() => Number) @IsInt() @Min(1) @IsOptional() size?: number = 20; @Type(() => Number) @IsInt() @IsOptional() customerId?: number; @IsString() @IsOptional() status?: string; }