import { Category } from '../../categories/entities/category.entity'; import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger'; import { Merchant } from '../../merchants/entities/merchant.entity'; import { Tag } from '../../tags/entities/tag.entity'; import { Temporal } from '@js-temporal/polyfill'; export class GetExpenseDto { @ApiProperty({ description: 'Unique ID of expense' }) id: string; @ApiProperty({ description: 'Date in YYYY-MM-DD format' }) date: Temporal.PlainDate; @ApiProperty({ description: 'Amount of expense in cents' }) cents: number; @ApiProperty({ description: 'Category of expense' }) category: Category @ApiPropertyOptional({ description: 'Note about expense' }) note: string; @ApiPropertyOptional({ description: 'Merchant for the expense' }) merchant: Merchant; @ApiPropertyOptional({ type: [Tag], description: 'List of tags for the expense' }) tags: Tag[]; }