mirror of
https://github.com/LukeHagar/immich.git
synced 2025-12-09 12:37:48 +00:00
* fix: remove config parameter from typeorm cli and update config the config parameter is no longer supported since version 0.3 the config now needs to export a DataSource object to work with the 0.3 cli * fix: update all typeorm entities and migrations to be aligned with database structure * Fixed test-util import databaseConfig * Fixed column mismatch in raw query with new migration * Remove dist build directory when starting dev server Co-authored-by: Alex Tran <alex.tran1502@gmail.com>
35 lines
625 B
TypeScript
35 lines
625 B
TypeScript
import { Column, CreateDateColumn, Entity, PrimaryGeneratedColumn } 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;
|
|
}
|