chore: update user fix

This commit is contained in:
mahyargdz
2025-07-13 13:16:40 +03:30
parent ed0e14c89a
commit 00dd77377d
14 changed files with 205 additions and 209 deletions
+2 -1
View File
@@ -1,4 +1,4 @@
import { Collection, Entity, EntityRepositoryType, ManyToOne, OneToMany, OneToOne, Opt, Property } from "@mikro-orm/core";
import { Collection, Entity, EntityRepositoryType, ManyToOne, OneToMany, OneToOne, Opt, Property, Unique } from "@mikro-orm/core";
import { RefreshToken } from "./refresh-token.entity";
import { Role } from "./role.entity";
@@ -9,6 +9,7 @@ import { EmailSignature } from "../../signatures/entities/email-signature.entity
import { UserRepository } from "../repositories/user.repository";
@Entity({ repository: () => UserRepository })
@Unique({ properties: ["userName", "domain"], name: "unique_user_name_domain", options: { where: "deleted_at is null" } })
export class User extends BaseEntity {
@Property({ type: "varchar", length: 150, nullable: false })
title!: string;