Configuring access rights in the CRM Super Admin

This commit is contained in:
2026-09-20 11:24:14 +03:30
parent 04d37a9d12
commit 4a9fe0b07c
29 changed files with 1235 additions and 35 deletions
+32
View File
@@ -1,10 +1,13 @@
import {
IsArray,
IsBoolean,
IsEmail,
IsIn,
IsInt,
IsOptional,
IsString,
MaxLength,
Min,
MinLength,
ValidateIf,
} from 'class-validator';
@@ -119,3 +122,32 @@ export class ResetPlatformUserPasswordDto {
@MaxLength(120)
password!: string;
}
export class ApplyBillingPlanDto {
@IsIn(['trial', 'monthly', 'quarterly', 'semiannual', 'yearly', 'custom'])
planCode!: 'trial' | 'monthly' | 'quarterly' | 'semiannual' | 'yearly' | 'custom';
@IsOptional()
@IsInt()
@Min(1)
maxOrganizations?: number;
@IsOptional()
@IsString()
expiresAt?: string;
@IsOptional()
@IsString()
@MaxLength(500)
notes?: string | null;
@IsOptional()
@IsIn(['active', 'expired', 'suspended'])
status?: 'active' | 'expired' | 'suspended';
}
export class UpdateOrgModulesDto {
@IsArray()
@IsString({ each: true })
enabledModules!: string[];
}