import { SchemaModel } from '@verb/src/libs/shared/base/base.model'; export class HostReferralModel implements SchemaModel { public campaignId = ''; public transactionId = ''; public constructor(hostReferralSchema?: HostReferralSchema) { if (hostReferralSchema) { this.fromSchema(hostReferralSchema); } } public fromSchema(hostReferralSchema: HostReferralSchema) { this.campaignId = hostReferralSchema.campaign_id; this.transactionId = hostReferralSchema.transaction_id; } public toSchema(): HostReferralSchema { return { campaign_id: this.campaignId, transaction_id: this.transactionId, }; } } export interface HostReferralSchema { campaign_id: string; transaction_id: string; }