Class: ExpenseDto
Data Transfer Object representing a complete expense record.
Description
This DTO extends the Zod schema from the database to provide complete type safety and validation for expense records. It represents the full shape of an expense including system-generated fields like ID and timestamps.
Example
{
* id: 'clf12345-6789-abcd-efgh-ijklmnopqrst',
* amount: 29.99,
* description: 'Grocery shopping',
* tags: ['food', 'groceries'],
* createdAt: '2024-02-26T10:00:00.000Z',
* updatedAt: '2024-02-26T10:00:00.000Z'
* }
Extends
any
Constructors
new ExpenseDto()
new ExpenseDto():
ExpenseDto
Returns
Inherited from
createZodDto(expenseSelectSchema).constructor