import { VIDEO_DIRECTION_TYPE, VIDEO_EVENT_TYPE } from '../constants'; import { IDefaultAttributes } from './commonInterface'; import { Document } from 'mongoose'; export interface ISpeedChangeEventData { position?: number; oldSpeed?: number; newSpeed?: number; contentTimeSpent?: number; contentViewDuration?: number; } export interface ISeekEventData { position?: number; directionType?: VIDEO_DIRECTION_TYPE; fromSecond?: number; toSecond?: number; offset?: number; } export type IEventData = ISpeedChangeEventData | ISeekEventData; export interface IVideoAnalystModelAttributes extends IDefaultAttributes, Document { id: string; appName: string; randomNumber: number; deviceId: string; platformName: string; deviceType: string; deviceName: string; fileId: string; bundle: string; storeUrl: string; appVersion: string; width: number; height: number; deviceMaker: string; deviceConnectionType: string; clintIp: string; userId: string; instituteId: string; geoLocation: { country: string; region: string; city: string; latitude: number; longitude: number; }; contentDuration: number; language: string; videoTitle: string; subject: string; keywords: string[]; pain: string; eventType: VIDEO_EVENT_TYPE; date: Date; videoLink: string; eventData?: IEventData; }