Files
canina/backend/src/pets/dto/create-reminder.dto.ts
T

25 lines
788 B
TypeScript

import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger';
import { IsNotEmpty, IsString, IsOptional } from 'class-validator';
export class CreateReminderDto {
@ApiProperty({ description: 'عنوان یادآور', example: 'قرص کلسیم' })
@IsNotEmpty()
@IsString()
title: string;
@ApiProperty({ description: 'زمان یادآور (مثال: 08:30)', example: '08:30' })
@IsNotEmpty()
@IsString()
time: string;
@ApiProperty({ description: 'دوره زمانی (روزانه / هفتگی)', example: 'روزانه' })
@IsNotEmpty()
@IsString()
frequency: string;
@ApiPropertyOptional({ description: 'شناسه محصول مربوطه', example: 'a1b2c3d4-1234-5678-abcd-ef1234567890' })
@IsOptional()
@IsString()
productId?: string;
}