File

src/app/core/models/survey.model.ts

Constructor

constructor(title: string, user_creator_id: number, questions: Question[], resource: string, id: number)

Properties

id
id: number
questions
questions: Question[]
questionsSurvey
questionsSurvey: QuestionSurvey[]
resource
resource: string
title
title: string
user_creator_id
user_creator_id: number
import { Question, QuestionSurvey } from "./question.model";

export class Survey {

    constructor(title: string, user_creator_id: number, questions: Question[], resource: string, id: number = 0){
        this.id = id;
        this.title = title;
        this.user_creator_id = user_creator_id;
        this.questions = questions;
        this.resource = resource;
    }

    id?: number;
    title: string = '';
    user_creator_id: number = -1;
    questions: Question[] = [];
    questionsSurvey: QuestionSurvey[] = [];
    resource: string = '';
}

export function equals(survey1: Survey, survey2: Survey): boolean {
    if (survey1.id != survey2.id)
        return false
    if (survey1.title != survey2.title)
        return false
    if (survey1.user_creator_id != survey2.user_creator_id)
        return false
    return true;
}

results matching ""

    No results matching ""