mirror of
https://github.com/immich-app/immich.git
synced 2025-12-26 09:14:58 +03:00
* feat(web,server): user preference for time-based memories * chore: open api * dev: mobile * fix: update * mobile work --------- Co-authored-by: Alex <alex.tran1502@gmail.com> Co-authored-by: Alex Tran <Alex.Tran@conductix.com>
66 lines
1.3 KiB
TypeScript
66 lines
1.3 KiB
TypeScript
import {
|
|
Column,
|
|
CreateDateColumn,
|
|
DeleteDateColumn,
|
|
Entity,
|
|
OneToMany,
|
|
PrimaryGeneratedColumn,
|
|
UpdateDateColumn,
|
|
} from 'typeorm';
|
|
import { AssetEntity } from './asset.entity';
|
|
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({ type: 'varchar', unique: true, default: null })
|
|
storageLabel!: string | null;
|
|
|
|
@Column({ type: 'varchar', default: null })
|
|
externalPath!: string | null;
|
|
|
|
@Column({ default: '', select: false })
|
|
password?: string;
|
|
|
|
@Column({ default: '' })
|
|
oauthId!: string;
|
|
|
|
@Column({ default: '' })
|
|
profileImagePath!: string;
|
|
|
|
@Column({ default: true })
|
|
shouldChangePassword!: boolean;
|
|
|
|
@CreateDateColumn({ type: 'timestamptz' })
|
|
createdAt!: Date;
|
|
|
|
@DeleteDateColumn({ type: 'timestamptz' })
|
|
deletedAt!: Date | null;
|
|
|
|
@UpdateDateColumn({ type: 'timestamptz' })
|
|
updatedAt!: Date;
|
|
|
|
@Column({ default: true })
|
|
memoriesEnabled!: boolean;
|
|
|
|
@OneToMany(() => TagEntity, (tag) => tag.user)
|
|
tags!: TagEntity[];
|
|
|
|
@OneToMany(() => AssetEntity, (asset) => asset.owner)
|
|
assets!: AssetEntity[];
|
|
}
|