feat: classes to ecapsulate the api calls better

This commit is contained in:
Mohamed Maoulainine Maoulainine
2025-04-27 13:29:31 +02:00
parent fcc20d1f42
commit a8e22de4a3
10 changed files with 422 additions and 0 deletions

View File

@ -0,0 +1,41 @@
// user-entrepreneur.ts
import User from "./User";
class UserEntrepreneur extends User {
private _school?: string;
private _course?: string;
private _sneeStatus?: boolean;
constructor(data: Partial<UserEntrepreneur> = {}) {
super(data);
this._school = data.school;
this._course = data.course;
this._sneeStatus = data.sneeStatus;
}
get school(): string | undefined {
return this._school;
}
set school(value: string | undefined) {
this._school = value;
}
get course(): string | undefined {
return this._course;
}
set course(value: string | undefined) {
this._course = value;
}
get sneeStatus(): boolean | undefined {
return this._sneeStatus;
}
set sneeStatus(value: boolean | undefined) {
this._sneeStatus = value;
}
}
export default UserEntrepreneur;