mirror of
https://github.com/immich-app/immich.git
synced 2025-05-31 20:25:32 -04:00
* Added EXIF extracting in the backend * Added EXIF displaying on `image_viewer_page.dart` * Added Icon for backup option not enable
53 lines
958 B
TypeScript
53 lines
958 B
TypeScript
import { Column, Entity, JoinColumn, OneToOne, PrimaryColumn, PrimaryGeneratedColumn, Unique } from 'typeorm';
|
|
import { ExifEntity } from './exif.entity';
|
|
|
|
@Entity('assets')
|
|
@Unique(['deviceAssetId', 'userId', 'deviceId'])
|
|
export class AssetEntity {
|
|
@PrimaryGeneratedColumn('uuid')
|
|
id: string;
|
|
|
|
@Column()
|
|
deviceAssetId: string;
|
|
|
|
@Column()
|
|
userId: string;
|
|
|
|
@Column()
|
|
deviceId: string;
|
|
|
|
@Column()
|
|
type: AssetType;
|
|
|
|
@Column()
|
|
originalPath: string;
|
|
|
|
@Column({ nullable: true })
|
|
resizePath: string;
|
|
|
|
@Column()
|
|
createdAt: string;
|
|
|
|
@Column()
|
|
modifiedAt: string;
|
|
|
|
@Column({ type: 'boolean', default: false })
|
|
isFavorite: boolean;
|
|
|
|
@Column({ nullable: true })
|
|
mimeType: string;
|
|
|
|
@Column({ nullable: true })
|
|
duration: string;
|
|
|
|
@OneToOne(() => ExifEntity, (exifEntity) => exifEntity.asset)
|
|
exifInfo: ExifEntity;
|
|
}
|
|
|
|
export enum AssetType {
|
|
IMAGE = 'IMAGE',
|
|
VIDEO = 'VIDEO',
|
|
AUDIO = 'AUDIO',
|
|
OTHER = 'OTHER',
|
|
}
|