mirror of
https://github.com/SyncrowIOT/backend.git
synced 2025-07-15 10:25:23 +00:00
Add Visitor Password Entity and Relationships
This commit is contained in:
@ -25,6 +25,7 @@ import { TimeZoneEntity } from '../../timezone/entities';
|
||||
import { OtpType } from '../../../../src/constants/otp-type.enum';
|
||||
import { RoleTypeEntity } from '../../role-type/entities';
|
||||
import { SpaceEntity } from '../../space/entities';
|
||||
import { VisitorPasswordEntity } from '../../visitor-password/entities';
|
||||
|
||||
@Entity({ name: 'user' })
|
||||
export class UserEntity extends AbstractEntity<UserDto> {
|
||||
@ -109,6 +110,11 @@ export class UserEntity extends AbstractEntity<UserDto> {
|
||||
nullable: true,
|
||||
})
|
||||
timezone: TimeZoneEntity;
|
||||
@OneToMany(
|
||||
() => VisitorPasswordEntity,
|
||||
(visitorPassword) => visitorPassword.user,
|
||||
)
|
||||
public visitorPasswords: VisitorPasswordEntity[];
|
||||
constructor(partial: Partial<UserEntity>) {
|
||||
super();
|
||||
Object.assign(this, partial);
|
||||
|
Reference in New Issue
Block a user