Skip to content

Instantly share code, notes, and snippets.

@adadgio
Created May 10, 2021 14:24
Show Gist options
  • Save adadgio/9c72045dd1a7ef8a0087d15b5e1ad77d to your computer and use it in GitHub Desktop.
Save adadgio/9c72045dd1a7ef8a0087d15b5e1ad77d to your computer and use it in GitHub Desktop.
import { ADVERT_TYPES } from "./Advert"
//export const CAMPAIGN_ACTIONS = [...ADVERT_TYPES, ['shortlink', 'notification']]
export class Project {
id: string | null = null
name: string | null = null
keyAccount: string | null = null
status: string | null = "1"
clientName: string | null = null
productName: string | null = null
actionCode: string | null = null
actionType: string | null = 'Post sponso'
//audienceType: string|null = null
targetSize: string | null = null
targetDesc: string | null = null
targetProfessionId: string | null = null
targetSpecialtyId: string | null = null
audienceId: string | null = null
audienceName: string | null = null
checkDate: string = null
startDate: string = null
endDate: string = null
adverts: Array<any> = []
static actions: Array<string> = ['post', 'quiz',]
constructor(data?: any) {
if (data) {
this.id = data.id
this.name = data.name
this.keyAccount = data.keyAccount
this.status = data.status
this.clientName = data.clientName
this.productName = data.productName
this.actionCode = data.actionCode
this.actionType = data.actionType
//this.audienceType = data.audienceType
this.targetDesc = data.targetDesc
this.targetSize = data.targetSize
this.targetProfessionId = data.targetProfessionId
this.targetSpecialtyId = data.targetSpecialtyId
this.checkDate = data.checkDate
this.startDate = data.startDate
this.endDate = data.endDate
this.audienceId = data.audienceId
this.audienceName = data.audienceName
this.adverts = data.adverts || []
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment