fix admn controller
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import { Column, CreateDateColumn, Entity, OneToMany, PrimaryGeneratedColumn } from 'typeorm';
|
||||
import type { Relation } from 'typeorm';
|
||||
import { Category } from './Category.js';
|
||||
import { Expense } from './Expense.js';
|
||||
import { dateTimeColumnType } from '../utils/db-column-types.js';
|
||||
|
||||
export type UserRole = 'ADMIN' | 'USER';
|
||||
|
||||
@@ -47,12 +47,12 @@ export class User {
|
||||
defaultListId?: string | null;
|
||||
} | null;
|
||||
|
||||
@CreateDateColumn({ type: 'datetime' })
|
||||
@CreateDateColumn({ type: dateTimeColumnType })
|
||||
createdAt!: Date;
|
||||
|
||||
@OneToMany(() => Category, (category) => category.user)
|
||||
categories!: Relation<Category[]>;
|
||||
categories!: Category[];
|
||||
|
||||
@OneToMany(() => Expense, (expense) => expense.user)
|
||||
expenses!: Relation<Expense[]>;
|
||||
expenses!: Expense[];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user