import { injectable } from "inversify"; import { IJsonApiResponse, IJsonApiResource, IJsonApiRelationship, IJsonApiRelationships, } from "../../interfaces"; import {IVideoSource} from "../videoSource/index"; import {IPlace} from "../place/index"; import {IPoi} from "../poi/index"; export const videoType = "video"; export interface IVideoAttributes { url?: string; tags?: string[]; iframe_embed?: string; html5_embed?: string; modify_date?: string; create_date?: string; name?: string; slug?: string; live?: boolean; reference_id?: string; short_description?: string; description?: string; duration?: number; is_360?: boolean; episode?: number; season?: number; format?: string; host?: string; director?: string; year?: string; pixel?: string; featured_order?: number; featured_priority?: boolean; spotlight?: boolean; hub?: boolean; thumbnail_url?: string; poster_url?: string; hero_url?: string; graphic_url?: string; provider_id?: string; provider_name?: string; start_date?: string; end_date?: string; } export interface IVideoRelationships extends IJsonApiRelationships { sources?: IJsonApiRelationship; places?: IJsonApiRelationship; pois?: IJsonApiRelationship; } export interface IVideoResource extends IJsonApiResource {} export interface IVideoResponse extends IJsonApiResponse {} export interface IVideo { id?: string; url?: string; tags?: string[]; iframeEmbed?: string; html5Embed?: string; updatedAt?: string; createdAt?: string; name?: string; slug?: string; live?: boolean; referenceId?: string; shortDescription?: string; longDescription?: string; duration?: number; isSpherical?: boolean; episode?: number; season?: number; format?: string; host?: string; director?: string; year?: string; pixel?: string; featuredOrder?: number; featuredPriority?: boolean; spotlight?: boolean; hub?: boolean; thumbnailUrl?: string; posterUrl?: string; heroUrl?: string; graphicUrl?: string; providerId?: string; providerName?: string; startDate?: string; endDate?: string; sources?: IVideoSource[]; places?: IPlace[]; pois?: IPoi[]; } @injectable() export default class Video implements IVideo { id?: string; url?: string; tags?: string[]; iframeEmbed?: string; html5Embed?: string; updatedAt?: string; createdAt?: string; name?: string; slug?: string; live?: boolean; referenceId?: string; shortDescription?: string; longDescription?: string; duration?: number; isSpherical?: boolean; episode?: number; season?: number; format?: string; host?: string; director?: string; year?: string; pixel?: string; featuredOrder?: number; featuredPriority?: boolean; spotlight?: boolean; hub?: boolean; thumbnailUrl?: string; posterUrl?: string; heroUrl?: string; graphicUrl?: string; providerId?: string; providerName?: string; startDate?: string; endDate?: string; sources?: IVideoSource[]; places?: IPlace[]; pois?: IPoi[]; constructor(options?: IVideo) { Object.assign(this, options); } }