diff --git a/classes/project.js b/classes/project.js new file mode 100644 index 0000000000000000000000000000000000000000..32e5801df56627104cf567d69e93d3f21ccc6eb6 --- /dev/null +++ b/classes/project.js @@ -0,0 +1,44 @@ +class Project { + constructor(ownerGitlabId, id, name, desc, logo) { + this.ownerGitlabId = ownerGitlabId + this.id = id + this.name = name + this.desc = desc + this.logo = logo + } + + // getter + getOwnerGitlabId() { + return this.ownerGitlabId + } + getId() { + return this.id + } + getName() { + return this.name + } + getDesc() { + return this.desc + } + getLogo() { + return this.logo + } + // setter + setOwnerGitlabId(newOwnerGitlabId){ + this.ownerGitlabId = newOwnerGitlabId + } + setId(newId) { + this.id = newId + } + setName(newName) { + this.name = newName + } + setDesc(newDesc) { + this.desc = newDesc + } + setLogo(newLogoUrl){ + this.logo = newLogoUrl + } +} + +module.exports = Project \ No newline at end of file diff --git a/classes/repo.js b/classes/repo.js new file mode 100644 index 0000000000000000000000000000000000000000..f0fef1f374268bd5b108aefec7096e3607bccb46 --- /dev/null +++ b/classes/repo.js @@ -0,0 +1,9 @@ +const Project = require("./project"); + +class Repo extends Project { + constructor(ownerGitlabId, id, name, desc, logo) { + super(ownerGitlabId, id, name, desc, logo) + } +} + +module.exports = Repo \ No newline at end of file diff --git a/classes/user.js b/classes/user.js index 3549bf007118e1c21ebf22591f8ca0ddaa985cfc..6589fef8c7f16505e386883c908bd888c4b5ed66 100644 --- a/classes/user.js +++ b/classes/user.js @@ -1,5 +1,5 @@ class User { - constructor(id, email, salutation, title, firstName, lastName, industry, organisation, speciality, m4lab_idp, gitlabUserId, verificationStatus) { + constructor(id, email, salutation, title, firstName, lastName, industry, organisation, speciality, is_m4lab_idp, gitlabUserId, verificationStatus) { this.id = id this.email = email this.salutation = salutation @@ -9,15 +9,55 @@ class User { this.industry = industry this.organisation = organisation this.speciality = speciality - this.m4lab_idp = m4lab_idp + this.is_m4lab_idp = is_m4lab_idp // 1 or 0 this.gitlabUserId = gitlabUserId this.verificationStatus = verificationStatus } // getter - get fullName() { + getFullName() { return this.firstName+' '+this.lastName } + getIdpStatus() { + return this.is_m4lab_idp + } + getGitlabUserId() { + return this.gitlabUserId + } + // 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 + } } module.exports = User \ No newline at end of file diff --git a/classes/website.js b/classes/website.js new file mode 100644 index 0000000000000000000000000000000000000000..28b2e391a92145556ad3b67985c5fce0142cf1c9 --- /dev/null +++ b/classes/website.js @@ -0,0 +1,25 @@ +const Project = require("./project"); + +class Website extends Project { + constructor(ownerGitlabId, id, name, desc, logo, settingUrl, kontaktUrl) { + super(ownerGitlabId, id, name, desc, logo) + this.settingUrl = settingUrl + this.kontaktUrl = kontaktUrl + } + // getter + getSettingUrl() { + return this.settingUrl + } + getKontaktUrl() { + return this.kontaktUrl + } + // setter + setSettingUrl(newSettingUrl) { + this.settingUrl = newSettingUrl + } + setKontaktUrl(newKontaktUrl) { + this.kontaktUrl = newKontaktUrl + } +} + +module.exports = Website \ No newline at end of file