modeling out expense entities and dtos
This commit is contained in:
parent
acdb7ad9c9
commit
7011e44662
10 changed files with 83 additions and 14 deletions
19
src/controllers/expenses/expense.dto.ts
Normal file
19
src/controllers/expenses/expense.dto.ts
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
import { PartialType } from '@nestjs/mapped-types';
|
||||
|
||||
export class CreateExpenseDto {
|
||||
year: string;
|
||||
month: string;
|
||||
day: string;
|
||||
cents: number;
|
||||
category: string;
|
||||
subcategory?: string[];
|
||||
merchant?: string;
|
||||
tags?: string[];
|
||||
description?: string;
|
||||
}
|
||||
|
||||
export class UpdateExpenseDto extends PartialType(CreateExpenseDto) { }
|
||||
|
||||
export class GetExpenseDto extends CreateExpenseDto{
|
||||
id: number;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue