added created/updated time for expenses

This commit is contained in:
Joe Arndt 2026-02-25 13:43:44 -06:00
parent d0337c5a67
commit 8f846bd253
4 changed files with 19 additions and 4 deletions

View file

@ -12,6 +12,6 @@ post {
body:json { body:json {
{ {
"name": "Gas" "name": "Groceries:Food"
} }
} }

View file

@ -12,6 +12,6 @@ post {
body:json { body:json {
{ {
"name": "Casey's" "name": "Walmart"
} }
} }

View file

@ -12,6 +12,6 @@ post {
body:json { body:json {
{ {
"name": "Joe" "name": "Sienna"
} }
} }

View file

@ -1,4 +1,13 @@
import { Column, Entity, JoinTable, ManyToMany, ManyToOne, PrimaryGeneratedColumn } from 'typeorm'; import {
Column,
CreateDateColumn,
Entity,
JoinTable,
ManyToMany,
ManyToOne,
PrimaryGeneratedColumn,
UpdateDateColumn,
} from 'typeorm';
import { Tag } from '../../tags/entities/tag.entity'; import { Tag } from '../../tags/entities/tag.entity';
import { Category } from '../../categories/entities/category.entity'; import { Category } from '../../categories/entities/category.entity';
import { Merchant } from '../../merchants/entities/merchant.entity'; import { Merchant } from '../../merchants/entities/merchant.entity';
@ -26,4 +35,10 @@ export class Expense {
@ManyToMany(() => Tag, { nullable: true, eager: true }) @ManyToMany(() => Tag, { nullable: true, eager: true })
@JoinTable() @JoinTable()
tags: Tag[]; tags: Tag[];
@CreateDateColumn()
createdAt: Date;
@UpdateDateColumn()
updatedAt: Date;
} }