immich/server/libs/database/src/entities/user.entity.ts
Zeeshan Khan fe4b307fe6
feat(server,web): Delete and restore user from the admin portal (#935)
* delete and restore user from admin UI

* addressed review comments and fix e2e test

* added cron job to delete user, and some formatting changes

* addressed review comments

* adding missing queue registration
2022-11-07 15:53:47 -06:00

37 lines
686 B
TypeScript

import { Column, CreateDateColumn, Entity, PrimaryGeneratedColumn, DeleteDateColumn } from 'typeorm';
@Entity('users')
export class UserEntity {
@PrimaryGeneratedColumn('uuid')
id!: string;
@Column({ default: '' })
firstName!: string;
@Column({ default: '' })
lastName!: string;
@Column({ default: false })
isAdmin!: boolean;
@Column()
email!: string;
@Column({ select: false })
password?: string;
@Column({ select: false })
salt?: string;
@Column({ default: '' })
profileImagePath!: string;
@Column({ default: true })
shouldChangePassword!: boolean;
@CreateDateColumn()
createdAt!: string;
@DeleteDateColumn()
deletedAt?: Date;
}