mirror of
https://github.com/immich-app/immich.git
synced 2025-06-03 05:36:44 -04:00
* feat(web,server): link/unlink oauth account * chore: linting * fix: broken oauth callback * fix: user core bugs * fix: tests * fix: use user response * chore: update docs * feat: prevent the same oauth account from being linked twice * chore: mock logger
45 lines
901 B
TypeScript
45 lines
901 B
TypeScript
import { Column, CreateDateColumn, DeleteDateColumn, Entity, OneToMany, PrimaryGeneratedColumn } from 'typeorm';
|
|
import { TagEntity } from './tag.entity';
|
|
|
|
@Entity('users')
|
|
export class UserEntity {
|
|
@PrimaryGeneratedColumn('uuid')
|
|
id!: string;
|
|
|
|
@Column({ default: '' })
|
|
firstName!: string;
|
|
|
|
@Column({ default: '' })
|
|
lastName!: string;
|
|
|
|
@Column({ default: false })
|
|
isAdmin!: boolean;
|
|
|
|
@Column({ unique: true })
|
|
email!: string;
|
|
|
|
@Column({ default: '', select: false })
|
|
password?: string;
|
|
|
|
@Column({ default: '', select: false })
|
|
salt?: string;
|
|
|
|
@Column({ default: '' })
|
|
oauthId!: string;
|
|
|
|
@Column({ default: '' })
|
|
profileImagePath!: string;
|
|
|
|
@Column({ default: true })
|
|
shouldChangePassword!: boolean;
|
|
|
|
@CreateDateColumn()
|
|
createdAt!: string;
|
|
|
|
@DeleteDateColumn()
|
|
deletedAt?: Date;
|
|
|
|
@OneToMany(() => TagEntity, (tag) => tag.user)
|
|
tags!: TagEntity[];
|
|
}
|