fix: adding toObject in ApiClasses
This commit is contained in:
parent
8ec569e6ff
commit
5130c00796
@ -63,6 +63,17 @@ class Appointment {
|
||||
set appointmentSubject(value: string | undefined) {
|
||||
this._appointmentSubject = value;
|
||||
}
|
||||
|
||||
toObject() {
|
||||
return {
|
||||
idAppointment: this.idAppointment,
|
||||
appointmentDate: this.appointmentDate,
|
||||
appointmentTime: this.appointmentTime,
|
||||
appointmentDuration: this.appointmentDuration,
|
||||
appointmentPlace: this.appointmentPlace,
|
||||
appointmentSubject: this.appointmentSubject,
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
export default Appointment;
|
||||
|
@ -27,6 +27,13 @@ class JoinRequest {
|
||||
set entrepreneur(value: UserEntrepreneur | undefined) {
|
||||
this._entrepreneur = value;
|
||||
}
|
||||
|
||||
toObject() {
|
||||
return {
|
||||
idProject: this.idProject,
|
||||
entrepreneur: this.entrepreneur,
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
export default JoinRequest;
|
||||
|
@ -13,6 +13,12 @@ class JoinRequestDecision {
|
||||
set isAccepted(value: boolean | undefined) {
|
||||
this._isAccepted = value;
|
||||
}
|
||||
|
||||
toObject() {
|
||||
return {
|
||||
isAccepted: this._isAccepted,
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
export default JoinRequestDecision;
|
||||
|
@ -33,6 +33,14 @@ class ProjectDecision {
|
||||
set isAccepted(value: boolean | undefined) {
|
||||
this._isAccepted = value;
|
||||
}
|
||||
|
||||
toObject() {
|
||||
return {
|
||||
projectId: this._projectId,
|
||||
adminId: this._adminId,
|
||||
isAccepted: this._isAccepted,
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
export default ProjectDecision;
|
||||
|
@ -23,6 +23,13 @@ class Report {
|
||||
set reportContent(value: string | undefined) {
|
||||
this._reportContent = value;
|
||||
}
|
||||
|
||||
toObject() {
|
||||
return {
|
||||
idReport: this._idReport,
|
||||
reportContent: this._reportContent,
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
export default Report;
|
||||
|
@ -62,6 +62,17 @@ class User {
|
||||
set phoneNumber(value: string | undefined) {
|
||||
this._phoneNumber = value;
|
||||
}
|
||||
|
||||
toObject() {
|
||||
return {
|
||||
idUser: this._idUser,
|
||||
userSurname: this._userSurname,
|
||||
userName: this._userName,
|
||||
primaryMail: this._primaryMail,
|
||||
secondaryMail: this._secondaryMail,
|
||||
phoneNumber: this._phoneNumber,
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
export default User;
|
||||
|
@ -5,6 +5,10 @@ class UserAdmin extends User {
|
||||
constructor(data: Partial<UserAdmin> = {}) {
|
||||
super(data);
|
||||
}
|
||||
|
||||
get idUser(): number | undefined {
|
||||
return super.idUser;
|
||||
}
|
||||
}
|
||||
|
||||
export default UserAdmin;
|
||||
|
@ -36,6 +36,15 @@ class UserEntrepreneur extends User {
|
||||
set sneeStatus(value: boolean | undefined) {
|
||||
this._sneeStatus = value;
|
||||
}
|
||||
|
||||
toObject() {
|
||||
return {
|
||||
...super.toObject(),
|
||||
school: this._school,
|
||||
course: this._course,
|
||||
sneeStatus: this._sneeStatus,
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
export default UserEntrepreneur;
|
||||
|
Loading…
x
Reference in New Issue
Block a user