An error occurred while loading the file. Please try again.
-
Rosanny Sihombing authored0b3430b4
class User {
constructor(id, email, salutation, title, firstName, lastName, industry, organisation, speciality, is_m4lab_idp, gitlabUserId, verificationStatus) {
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 // 1 or 0
this.gitlabUserId = gitlabUserId
this.verificationStatus = verificationStatus
}
// getter
getId() {
return this.id
}
getEmail() {
return this.email
}
getFullName() {
return this.firstName+' '+this.lastName
}
getIdpStatus() {
return this.is_m4lab_idp
}
getGitlabUserId() {
return this.gitlabUserId
}
getVerificationStatus() {
return this.verificationStatus
}
// setter
setEmail(email) {
this.email = email
}
setSalutation(salutation) {
this.salutation = salutation
}
setTitle(title) {
this.title = title
}
setFirstName(firstName) {
this.firstName = firstName
}
setLastName(lastName) {
this.lastName = lastName
}
setIndustry(industry) {
this.industry = industry
}
setOrganisation(organisation) {
this.organisation = organisation
}
setSpeciality(speciality) {
this.speciality = speciality
}
setM4lab_idp(m4lab_idp) {
this.m4lab_idp = m4lab_idp
}
setGitlabUserId(newGitlabUserId) {
this.gitlabUserId = newGitlabUserId
}
setVerificationStatus(verificationStatus) {
this.verificationStatus = verificationStatus
}
updateProfile(newSalutation, newTitle, newFirstname, newLastname, newEmail, newOrganisation, newIndustry, newSpeciality) {
this.salutation = newSalutation
this.title = newTitle
this.firstName = newFirstname
this.lastName = newLastname
this.email = newEmail
this.organisation = newOrganisation
this.industry = newIndustry
this.speciality = newSpeciality
}
}
module.exports = User