fix relations
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import { Column, CreateDateColumn, Entity, ManyToOne, PrimaryGeneratedColumn, UpdateDateColumn } from 'typeorm';
|
||||
import type { Relation } from 'typeorm';
|
||||
import { Category } from './Category.js';
|
||||
import { User } from './User.js';
|
||||
import { decimalTransformer } from '../utils/decimal.js';
|
||||
@@ -71,8 +72,8 @@ export class RecurringExpense {
|
||||
updatedAt!: Date;
|
||||
|
||||
@ManyToOne(() => User, { onDelete: 'CASCADE' })
|
||||
user!: User;
|
||||
user!: Relation<User>;
|
||||
|
||||
@ManyToOne(() => Category, { eager: true, onDelete: 'RESTRICT' })
|
||||
category!: Category;
|
||||
category!: Relation<Category>;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user