mirror of
https://github.com/immich-app/immich
synced 2025-11-07 17:27:20 +00:00
21 lines
499 B
TypeScript
21 lines
499 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;
|
||
|
|
|
||
|
|
@ManyToOne(() => UserEntity)
|
||
|
|
user!: UserEntity;
|
||
|
|
|
||
|
|
@CreateDateColumn({ type: 'timestamptz' })
|
||
|
|
createdAt!: string;
|
||
|
|
|
||
|
|
@UpdateDateColumn({ type: 'timestamptz' })
|
||
|
|
updatedAt!: string;
|
||
|
|
}
|