1
0
mirror of https://github.com/xuthus83/pigallery2.git synced 2025-01-14 14:43:17 +08:00

22 lines
525 B
TypeScript
Raw Normal View History

import {Column, Entity, ChildEntity} from 'typeorm';
import { MediaEntity, MediaMetadataEntity} from './MediaEntity';
import {VideoDTO, VideoMetadata} from '../../../../common/entities/VideoDTO';
export class VideoMetadataEntity extends MediaMetadataEntity implements VideoMetadata {
@Column('int')
bitRate: number;
@Column('bigint')
duration: number;
}
@ChildEntity()
export class VideoEntity extends MediaEntity implements VideoDTO {
@Column(type => VideoMetadataEntity)
metadata: VideoMetadataEntity;
}