forked from Cutlery/immich
* Implementing video upload features * setup image resize processor * Add video thumbnail with duration and icon * Fixed issue with video upload timeout and upper case file type on ios * Added video player page * Added video player page * Fixing video player not play on ios * Added partial file streaming for ios/android video request * Added nginx as proxy server for better file serving * update nginx and docker-compose file * Video player working correctly * Video player working correctly * Split duration to the second
49 lines
803 B
TypeScript
49 lines
803 B
TypeScript
import { Column, Entity, PrimaryColumn, PrimaryGeneratedColumn, Unique } from 'typeorm';
|
|
|
|
@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;
|
|
}
|
|
|
|
export enum AssetType {
|
|
IMAGE = 'IMAGE',
|
|
VIDEO = 'VIDEO',
|
|
AUDIO = 'AUDIO',
|
|
OTHER = 'OTHER',
|
|
}
|