feat: 新增license

This commit is contained in:
小蟑螂
2026-07-06 19:34:53 +08:00
parent 8a6cb23c07
commit ac890dcc5c
110 changed files with 10678 additions and 1368 deletions
@@ -0,0 +1,58 @@
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[];
}
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;
}