fix relations
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import { Column, CreateDateColumn, Entity, OneToMany, PrimaryGeneratedColumn } from 'typeorm';
|
||||
import type { Relation } from 'typeorm';
|
||||
import { Category } from './Category.js';
|
||||
import { Expense } from './Expense.js';
|
||||
|
||||
@@ -50,8 +51,8 @@ export class User {
|
||||
createdAt!: Date;
|
||||
|
||||
@OneToMany(() => Category, (category) => category.user)
|
||||
categories!: Category[];
|
||||
categories!: Relation<Category[]>;
|
||||
|
||||
@OneToMany(() => Expense, (expense) => expense.user)
|
||||
expenses!: Expense[];
|
||||
expenses!: Relation<Expense[]>;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user