docta-package 1.2.53 → 1.2.55
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -19,7 +19,10 @@ export declare class SessionOutputDto {
|
|
|
19
19
|
constructor(session: ISessionDocument);
|
|
20
20
|
}
|
|
21
21
|
export declare class SessionPatientOutputDto extends SessionOutputDto {
|
|
22
|
-
|
|
22
|
+
pricing: {
|
|
23
|
+
totalPrice: number;
|
|
24
|
+
paymentApiPrice: number;
|
|
25
|
+
};
|
|
23
26
|
constructor(session: ISessionDocument);
|
|
24
27
|
}
|
|
25
28
|
export declare class SessionDoctorOutputDto extends SessionOutputDto {
|
|
@@ -27,10 +30,12 @@ export declare class SessionDoctorOutputDto extends SessionOutputDto {
|
|
|
27
30
|
constructor(session: ISessionDocument);
|
|
28
31
|
}
|
|
29
32
|
export declare class SessionAdminOutputDto extends SessionOutputDto {
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
33
|
+
pricing: {
|
|
34
|
+
totalPrice: number;
|
|
35
|
+
doctorPrice: number;
|
|
36
|
+
paymentApiPrice: number;
|
|
37
|
+
platformPrice: number;
|
|
38
|
+
};
|
|
34
39
|
hasDoctorCollected: boolean;
|
|
35
40
|
hasPlatformCollected: boolean;
|
|
36
41
|
config: ISessionConfigOutput;
|
|
@@ -21,7 +21,10 @@ exports.SessionOutputDto = SessionOutputDto;
|
|
|
21
21
|
class SessionPatientOutputDto extends SessionOutputDto {
|
|
22
22
|
constructor(session) {
|
|
23
23
|
super(session); // call base constructor
|
|
24
|
-
this.
|
|
24
|
+
this.pricing = {
|
|
25
|
+
totalPrice: session.pricing.totalPrice,
|
|
26
|
+
paymentApiPrice: session.pricing.paymentApiPrice,
|
|
27
|
+
};
|
|
25
28
|
}
|
|
26
29
|
}
|
|
27
30
|
exports.SessionPatientOutputDto = SessionPatientOutputDto;
|
|
@@ -29,7 +32,7 @@ exports.SessionPatientOutputDto = SessionPatientOutputDto;
|
|
|
29
32
|
class SessionDoctorOutputDto extends SessionOutputDto {
|
|
30
33
|
constructor(session) {
|
|
31
34
|
super(session); // call base constructor
|
|
32
|
-
this.price = session.doctorPrice;
|
|
35
|
+
this.price = session.pricing.doctorPrice;
|
|
33
36
|
}
|
|
34
37
|
}
|
|
35
38
|
exports.SessionDoctorOutputDto = SessionDoctorOutputDto;
|
|
@@ -37,10 +40,12 @@ exports.SessionDoctorOutputDto = SessionDoctorOutputDto;
|
|
|
37
40
|
class SessionAdminOutputDto extends SessionOutputDto {
|
|
38
41
|
constructor(session) {
|
|
39
42
|
super(session); // call base constructor
|
|
40
|
-
this.
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
43
|
+
this.pricing = {
|
|
44
|
+
totalPrice: session.pricing.totalPrice,
|
|
45
|
+
doctorPrice: session.pricing.doctorPrice,
|
|
46
|
+
paymentApiPrice: session.pricing.paymentApiPrice,
|
|
47
|
+
platformPrice: session.pricing.platformPrice,
|
|
48
|
+
};
|
|
44
49
|
this.hasDoctorCollected = session.hasDoctorCollected;
|
|
45
50
|
this.hasPlatformCollected = session.hasPlatformCollected;
|
|
46
51
|
this.config = {
|
|
@@ -19,10 +19,12 @@ export interface ISession extends IBaseModel {
|
|
|
19
19
|
period: IPeriodDocument;
|
|
20
20
|
patient: IPatientDocument;
|
|
21
21
|
status: SessionStatus;
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
22
|
+
pricing: {
|
|
23
|
+
totalPrice: number;
|
|
24
|
+
doctorPrice: number;
|
|
25
|
+
paymentApiPrice: number;
|
|
26
|
+
platformPrice: number;
|
|
27
|
+
};
|
|
26
28
|
hasDoctorCollected: boolean;
|
|
27
29
|
hasPlatformCollected: boolean;
|
|
28
30
|
meta: ISessionConfig;
|
package/build/models/session.js
CHANGED
|
@@ -22,7 +22,12 @@ const SessionSchema = new mongoose_1.Schema(Object.assign(Object.assign({}, base
|
|
|
22
22
|
enum: Object.values(session_status_1.SessionStatus),
|
|
23
23
|
default: session_status_1.SessionStatus.Created,
|
|
24
24
|
required: true,
|
|
25
|
-
},
|
|
25
|
+
}, pricing: {
|
|
26
|
+
totalPrice: { type: Number, required: true },
|
|
27
|
+
doctorPrice: { type: Number, required: true },
|
|
28
|
+
platformPrice: { type: Number, required: true },
|
|
29
|
+
paymentApiPrice: { type: Number, required: true },
|
|
30
|
+
}, meta: {
|
|
26
31
|
originalDoctorConsultationFeePerHour: { type: Number, required: true },
|
|
27
32
|
platformPercentage: { type: Number, required: true },
|
|
28
33
|
collectionPercentage: { type: Number, required: true },
|