This commit is contained in:
2025-11-10 23:00:59 +03:30
parent bca4b75b6a
commit 6a25bf9116
6 changed files with 28 additions and 49 deletions
+3 -2
View File
@@ -1,5 +1,6 @@
import { Entity, Property, BaseEntity, OneToMany, Collection } from '@mikro-orm/core';
import { Entity, Property, OneToMany, Collection } from '@mikro-orm/core';
import { RefreshToken } from './refresh-token.entity';
import { BaseEntity } from 'src/common/entities/base.entity';
@Entity({ tableName: 'users' })
export class User extends BaseEntity {
@@ -13,7 +14,7 @@ export class User extends BaseEntity {
phone!: string;
@Property({ default: true })
isActive: boolean = true;
isActive?: boolean;
@OneToMany(() => RefreshToken, token => token.user)
refreshTokens = new Collection<RefreshToken>(this);