An error occurred while loading the file. Please try again.
-
Rosanny Sihombing authored4450156e
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
isM4labIdp: 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, isM4labIdp: 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.isM4labIdp = isM4labIdp
this.verificationStatus = verificationStatus
this.gitlabUserId = gitlabUserId
}
// getter
getId () {
return this.id
}
getEmail () {
return this.email
}
getFullName () {
return this.firstName + ' ' + this.lastName
}
getIdpStatus () {
return this.isM4labIdp
}
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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
}
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 (m4labIdp: number) {
this.isM4labIdp = m4labIdp
}
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 }