import { BaseModel } from '@verb/src/libs/shared/base/base.model'; export class StreamServerRequestModel implements BaseModel { public publisherId: number | null = null; public secret: string | null = null; public streamId = 0; public token: string | null = null; public webhookUrl: string | null = null; public constructor(streamServerRequestSchema?: StreamServerRequestSchema) { if (streamServerRequestSchema) { this.fromSchema(streamServerRequestSchema); } } public toSchema(): StreamServerRequestSchema { return { publisher_id: this.publisherId, secret: this.secret, stream_id: this.streamId, webhook_url: this.webhookUrl, }; } public fromSchema(streamServerRequestSchema: StreamServerRequestSchema) { this.publisherId = streamServerRequestSchema.publisher_id; this.secret = streamServerRequestSchema.secret; this.streamId = streamServerRequestSchema.stream_id; this.webhookUrl = streamServerRequestSchema.webhook_url; } } export interface StreamServerRequestSchema { publisher_id: number | null; secret: string | null; stream_id: number; webhook_url: string | null; }