You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
616 B
23 lines
616 B
import { Answer } from './answer.model'; |
|
import { PollConfig } from './poll-config.model'; |
|
import { PollOption } from './poll-options.model'; |
|
import { User } from './user.model'; |
|
import { environment } from 'src/environments/environment'; |
|
|
|
export class Poll { |
|
constructor( |
|
public isDateType: boolean, |
|
public title: string, |
|
public description: string, |
|
public slug: string, |
|
public id: string, |
|
public owner?: User, |
|
public config?: PollConfig, |
|
public options: PollOption[] = [], |
|
public answers: Answer[] = [] |
|
) {} |
|
|
|
public getUrl(): string { |
|
return `${environment.api.baseHref}/${this.slug}`; |
|
} |
|
}
|
|
|