feat: classes to ecapsulate the api calls better
This commit is contained in:
41
front/MyINPulse-front/src/ApiClasses/UserEntrepreneur.ts
Normal file
41
front/MyINPulse-front/src/ApiClasses/UserEntrepreneur.ts
Normal 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;
|
Reference in New Issue
Block a user