mirror of
https://github.com/immich-app/immich
synced 2025-11-07 17:27:20 +00:00
* feat: manage authorized devices * chore: open api * get header from mobile app * write header from mobile app * styling * fix unit test * feat: use relative time * feat: update access time * fix: tests * chore: confirm wording * chore: bump test coverage thresholds * feat: add some icons * chore: icon tweaks --------- Co-authored-by: Alex Tran <alex.tran1502@gmail.com>
29 lines
627 B
TypeScript
29 lines
627 B
TypeScript
import { Column, CreateDateColumn, Entity, ManyToOne, PrimaryGeneratedColumn, UpdateDateColumn } from 'typeorm';
|
|
import { UserEntity } from './user.entity';
|
|
|
|
@Entity('user_token')
|
|
export class UserTokenEntity {
|
|
@PrimaryGeneratedColumn('uuid')
|
|
id!: string;
|
|
|
|
@Column({ select: false })
|
|
token!: string;
|
|
|
|
@Column()
|
|
userId!: string;
|
|
|
|
@ManyToOne(() => UserEntity)
|
|
user!: UserEntity;
|
|
|
|
@CreateDateColumn({ type: 'timestamptz' })
|
|
createdAt!: Date;
|
|
|
|
@UpdateDateColumn({ type: 'timestamptz' })
|
|
updatedAt!: Date;
|
|
|
|
@Column({ default: '' })
|
|
deviceType!: string;
|
|
|
|
@Column({ default: '' })
|
|
deviceOS!: string;
|
|
}
|