mirror of
https://github.com/KevinMidboe/immich.git
synced 2026-03-05 05:29:19 +00:00
refactor(server): flatten infra folders (#2120)
* refactor: flatten infra folders * fix: database migrations * fix: test related import * fix: github actions workflow * chore: rename schemas to typesense-schemas
This commit is contained in:
32
server/libs/infra/src/entities/device-info.entity.ts
Normal file
32
server/libs/infra/src/entities/device-info.entity.ts
Normal file
@@ -0,0 +1,32 @@
|
||||
import { Column, CreateDateColumn, Entity, PrimaryGeneratedColumn, Unique } from 'typeorm';
|
||||
|
||||
@Entity('device_info')
|
||||
@Unique(['userId', 'deviceId'])
|
||||
export class DeviceInfoEntity {
|
||||
@PrimaryGeneratedColumn()
|
||||
id!: number;
|
||||
|
||||
@Column()
|
||||
userId!: string;
|
||||
|
||||
@Column()
|
||||
deviceId!: string;
|
||||
|
||||
@Column()
|
||||
deviceType!: DeviceType;
|
||||
|
||||
@Column({ type: 'varchar', nullable: true })
|
||||
notificationToken!: string | null;
|
||||
|
||||
@CreateDateColumn()
|
||||
createdAt!: string;
|
||||
|
||||
@Column({ type: 'bool', default: false })
|
||||
isAutoBackup!: boolean;
|
||||
}
|
||||
|
||||
export enum DeviceType {
|
||||
IOS = 'IOS',
|
||||
ANDROID = 'ANDROID',
|
||||
WEB = 'WEB',
|
||||
}
|
||||
Reference in New Issue
Block a user