Files
grow-api/src/subscriptions/dto/create-subscription-plan.dto.ts
T
2026-07-02 19:54:55 +03:30

38 lines
473 B
TypeScript

import {
IsBoolean,
IsInt,
IsNotEmpty,
IsOptional,
IsString,
Length,
Min,
} from 'class-validator';
export class CreateSubscriptionPlanDto {
@IsString()
@Length(1, 100)
@IsNotEmpty()
name: string;
@IsString()
@Length(1, 50)
@IsNotEmpty()
code: string;
@IsInt()
@Min(1)
durationMonths: number;
@IsInt()
@Min(0)
price: number;
@IsInt()
@Min(0)
freeSmsCount: number;
@IsOptional()
@IsBoolean()
isActive?: boolean;
}