docta-package 1.2.135 → 1.2.138
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.
|
@@ -26,6 +26,7 @@ export declare class DoctorPublicOutputDto {
|
|
|
26
26
|
faqs: FaqOutputDto[];
|
|
27
27
|
expertises: ExpertiseOutputDto[];
|
|
28
28
|
location: LocationOutputDto | null;
|
|
29
|
+
averageRating: number;
|
|
29
30
|
constructor(doctor: IDoctorDocument);
|
|
30
31
|
}
|
|
31
32
|
export declare class DoctorOutputDto extends DoctorPublicOutputDto {
|
|
@@ -25,6 +25,7 @@ class DoctorPublicOutputDto {
|
|
|
25
25
|
this.isVerified = doctor.isVerified;
|
|
26
26
|
this.isVisible = doctor.isVisible;
|
|
27
27
|
this.photo = doctor.photo || null;
|
|
28
|
+
this.averageRating = (doctor === null || doctor === void 0 ? void 0 : doctor.averageRating) || 0;
|
|
28
29
|
this.educations = (doctor.educations || [])
|
|
29
30
|
.map((e) => new education_1.EducationOutputDto(e))
|
|
30
31
|
.sort((a, b) => b.year - a.year);
|
|
@@ -44,5 +44,6 @@ export declare enum EnumStatusCode {
|
|
|
44
44
|
SESSION_CANCELLED_ALREADY = "SESSION_CANCELLED_ALREADY",
|
|
45
45
|
SESSION_NOT_PAID_FOR_DOCTOR_CANCELATION = "SESSION_NOT_PAID_FOR_DOCTOR_CANCELATION",
|
|
46
46
|
SESSION_NOT_COMPLETED = "SESSION_NOT_COMPLETED",
|
|
47
|
-
RATING_EXISTS_ALREADY = "RATING_EXISTS_ALREADY"
|
|
47
|
+
RATING_EXISTS_ALREADY = "RATING_EXISTS_ALREADY",
|
|
48
|
+
PERIOD_NOT_PASSED = "PERIOD_NOT_PASSED"
|
|
48
49
|
}
|
|
@@ -49,4 +49,5 @@ var EnumStatusCode;
|
|
|
49
49
|
EnumStatusCode["SESSION_NOT_PAID_FOR_DOCTOR_CANCELATION"] = "SESSION_NOT_PAID_FOR_DOCTOR_CANCELATION";
|
|
50
50
|
EnumStatusCode["SESSION_NOT_COMPLETED"] = "SESSION_NOT_COMPLETED";
|
|
51
51
|
EnumStatusCode["RATING_EXISTS_ALREADY"] = "RATING_EXISTS_ALREADY";
|
|
52
|
+
EnumStatusCode["PERIOD_NOT_PASSED"] = "PERIOD_NOT_PASSED";
|
|
52
53
|
})(EnumStatusCode || (exports.EnumStatusCode = EnumStatusCode = {}));
|
package/build/models/doctor.d.ts
CHANGED
package/build/models/doctor.js
CHANGED
|
@@ -33,7 +33,7 @@ const DoctorSchema = new mongoose_1.Schema(Object.assign(Object.assign({}, base_
|
|
|
33
33
|
type: [{ type: mongoose_1.Schema.Types.ObjectId, ref: expertise_1.ExpertiseModel }],
|
|
34
34
|
required: true,
|
|
35
35
|
default: [],
|
|
36
|
-
}, location: { type: location_1.LocationSchema, required: false } }));
|
|
36
|
+
}, location: { type: location_1.LocationSchema, required: false }, averageRating: { type: Number, required: false, default: 0 } }));
|
|
37
37
|
const createSlug = (text) => text
|
|
38
38
|
.toLowerCase()
|
|
39
39
|
.trim()
|
package/package.json
CHANGED