class User { id: number email: string salutation: string // should be enum title: string // should be enum firstName: string lastName: string industry: string organisation: string speciality: string is_m4lab_idp: number // 1 or 0 verificationStatus: number // 1 or 0 - // should be boolean gitlabUserId?: number constructor (id: number, email: string, salutation: string, title: string, firstName: string, lastName: string, industry: string, organisation: string, speciality: string, is_m4lab_idp: number, verificationStatus: number, gitlabUserId?: number) { this.id = id this.email = email this.salutation = salutation this.title = title this.firstName = firstName this.lastName = lastName this.industry = industry this.organisation = organisation this.speciality = speciality this.is_m4lab_idp = is_m4lab_idp this.verificationStatus = verificationStatus this.gitlabUserId = gitlabUserId } // getter getId () { return this.id } getEmail () { return this.email } getFullName () { return this.firstName + ' ' + this.lastName } getIdpStatus () { return this.is_m4lab_idp } getVerificationStatus () { return this.verificationStatus } getGitlabUserId () { return this.gitlabUserId } // setter setEmail (email: string) { this.email = email } setSalutation (salutation: string) { this.salutation = salutation } setTitle (title: string) { this.title = title } setFirstName (firstName: string) { this.firstName = firstName } setLastName (lastName: string) { this.lastName = lastName } setIndustry (industry: string) { this.industry = industry } setOrganisation (organisation: string) { this.organisation = organisation } setSpeciality (speciality: string) { this.speciality = speciality } setM4lab_idp (m4lab_idp: number) { this.is_m4lab_idp = m4lab_idp } setVerificationStatus (verificationStatus: number) { this.verificationStatus = verificationStatus } setGitlabUserId (newGitlabUserId: number) { this.gitlabUserId = newGitlabUserId } updateProfile (newSalutation: string, newTitle: string, newFirstname: string, newLastname: string, newEmail: string, newOrganisation: string, newIndustry: string, newSpeciality: string) { this.salutation = newSalutation this.title = newTitle this.firstName = newFirstname this.lastName = newLastname this.email = newEmail this.organisation = newOrganisation this.industry = newIndustry this.speciality = newSpeciality } } export = User