docta-package 1.2.47 → 1.2.49
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.
- package/build/dto/input/doctor.d.ts +1 -1
- package/build/dto/input/doctor.js +1 -1
- package/build/dto/output/doctor.d.ts +1 -1
- package/build/dto/output/doctor.js +1 -1
- package/build/dto/output/session.d.ts +3 -1
- package/build/dto/output/session.js +3 -1
- package/build/enums/status-codes.d.ts +5 -1
- package/build/enums/status-codes.js +4 -0
- package/build/models/doctor.d.ts +1 -1
- package/build/models/doctor.js +1 -1
- package/build/models/session.d.ts +3 -1
- package/build/models/session.js +5 -3
- package/package.json +1 -1
|
@@ -45,7 +45,7 @@ __decorate([
|
|
|
45
45
|
(0, class_validator_1.IsNumber)(),
|
|
46
46
|
(0, class_validator_1.Min)(0),
|
|
47
47
|
__metadata("design:type", Number)
|
|
48
|
-
], CreateDoctorDto.prototype, "
|
|
48
|
+
], CreateDoctorDto.prototype, "consultationFeePerHour", void 0);
|
|
49
49
|
__decorate([
|
|
50
50
|
(0, class_validator_1.IsString)(),
|
|
51
51
|
(0, class_validator_1.IsNotEmpty)(),
|
|
@@ -20,7 +20,7 @@ class DoctorOutputDto {
|
|
|
20
20
|
this.slug = doctor.slug;
|
|
21
21
|
this.biography = doctor.biography || null;
|
|
22
22
|
this.isActive = doctor.isActive;
|
|
23
|
-
this.
|
|
23
|
+
this.consultationFeePerHour = (_a = doctor.consultationFeePerHour) !== null && _a !== void 0 ? _a : null;
|
|
24
24
|
this.isVerified = doctor.isVerified;
|
|
25
25
|
this.isVisible = doctor.isVisible;
|
|
26
26
|
this.photo = doctor.photo || null;
|
|
@@ -3,8 +3,10 @@ import { PeriodOutputDto } from "./period";
|
|
|
3
3
|
import { PatientOutputDto } from "./patient";
|
|
4
4
|
import { UserOutputDto } from "./user";
|
|
5
5
|
interface ISessionConfigOutput {
|
|
6
|
+
originalDoctorConsultationFeePerHour: number;
|
|
7
|
+
platformPercentage: number;
|
|
6
8
|
collectionPercentage: number;
|
|
7
|
-
|
|
9
|
+
disbursementPercentage: number;
|
|
8
10
|
}
|
|
9
11
|
export declare class SessionOutputDto {
|
|
10
12
|
id: string;
|
|
@@ -44,8 +44,10 @@ class SessionAdminOutputDto extends SessionOutputDto {
|
|
|
44
44
|
this.hasDoctorCollected = session.hasDoctorCollected;
|
|
45
45
|
this.hasPlatformCollected = session.hasPlatformCollected;
|
|
46
46
|
this.config = {
|
|
47
|
+
originalDoctorConsultationFeePerHour: session.config.originalDoctorConsultationFeePerHour,
|
|
48
|
+
platformPercentage: session.config.platformPercentage,
|
|
47
49
|
collectionPercentage: session.config.collectionPercentage,
|
|
48
|
-
|
|
50
|
+
disbursementPercentage: session.config.disbursementPercentage,
|
|
49
51
|
};
|
|
50
52
|
this.createdBy = session.createdBy
|
|
51
53
|
? new user_1.UserOutputDto(session.createdBy)
|
|
@@ -28,5 +28,9 @@ export declare enum EnumStatusCode {
|
|
|
28
28
|
OVERLAP_EXISTS = "OVERLAP_EXISTS",
|
|
29
29
|
BOLD_TIME_ERROR = "BOLD_TIME_ERROR",
|
|
30
30
|
LOGGED_IN_SUCCESSFULLY = "LOGGED_IN_SUCCESSFULLY",
|
|
31
|
-
NOT_SAME_DAY = "NOT_SAME_DAY"
|
|
31
|
+
NOT_SAME_DAY = "NOT_SAME_DAY",
|
|
32
|
+
PERIOD_OCCUPIED = "PERIOD_OCCUPIED",
|
|
33
|
+
PATIENT_NOT_FOUND = "PATIENT_NOT_FOUND",
|
|
34
|
+
PERIOD_NOT_FOUND = "PERIOD_NOT_FOUND",
|
|
35
|
+
PERIOD_PASSED = "PERIOD_PASSED"
|
|
32
36
|
}
|
|
@@ -33,4 +33,8 @@ var EnumStatusCode;
|
|
|
33
33
|
EnumStatusCode["BOLD_TIME_ERROR"] = "BOLD_TIME_ERROR";
|
|
34
34
|
EnumStatusCode["LOGGED_IN_SUCCESSFULLY"] = "LOGGED_IN_SUCCESSFULLY";
|
|
35
35
|
EnumStatusCode["NOT_SAME_DAY"] = "NOT_SAME_DAY";
|
|
36
|
+
EnumStatusCode["PERIOD_OCCUPIED"] = "PERIOD_OCCUPIED";
|
|
37
|
+
EnumStatusCode["PATIENT_NOT_FOUND"] = "PATIENT_NOT_FOUND";
|
|
38
|
+
EnumStatusCode["PERIOD_NOT_FOUND"] = "PERIOD_NOT_FOUND";
|
|
39
|
+
EnumStatusCode["PERIOD_PASSED"] = "PERIOD_PASSED";
|
|
36
40
|
})(EnumStatusCode || (exports.EnumStatusCode = EnumStatusCode = {}));
|
package/build/models/doctor.d.ts
CHANGED
|
@@ -15,7 +15,7 @@ export interface IDoctor extends IBaseModel {
|
|
|
15
15
|
user: IUserDocument;
|
|
16
16
|
specialty: ISpecialtyDocument;
|
|
17
17
|
biography: string;
|
|
18
|
-
|
|
18
|
+
consultationFeePerHour: number;
|
|
19
19
|
isVerified: boolean;
|
|
20
20
|
isVisible: boolean;
|
|
21
21
|
isDeactivatedByAdmin: boolean;
|
package/build/models/doctor.js
CHANGED
|
@@ -29,7 +29,7 @@ const DoctorSchema = new mongoose_1.Schema(Object.assign(Object.assign({}, base_
|
|
|
29
29
|
type: mongoose_1.Schema.Types.ObjectId,
|
|
30
30
|
ref: specialty_1.SpecialtyModel,
|
|
31
31
|
required: true,
|
|
32
|
-
}, name: { type: String, required: true, trim: true }, biography: { type: String, required: false }, slug: { type: String, required: true, unique: true, trim: true }, isActive: { type: Boolean, default: false },
|
|
32
|
+
}, name: { type: String, required: true, trim: true }, biography: { type: String, required: false }, slug: { type: String, required: true, unique: true, trim: true }, isActive: { type: Boolean, default: false }, consultationFeePerHour: { type: Number, required: false }, isVerified: { type: Boolean, default: false }, isVisible: { type: Boolean, default: true }, isDeactivatedByAdmin: { type: Boolean, default: false }, photo: { type: String, required: false }, educations: { type: [education_1.EducationSchema], required: true, default: [] }, positions: { type: [position_1.PositionSchema], required: true, default: [] }, languages: { type: [language_1.LanguageSchema], required: true, default: [] }, faqs: { type: [faq_1.FaqSchema], required: true, default: [] }, expertises: {
|
|
33
33
|
type: [{ type: mongoose_1.Schema.Types.ObjectId, ref: expertise_1.ExpertiseModel }],
|
|
34
34
|
required: true,
|
|
35
35
|
default: [],
|
|
@@ -7,8 +7,10 @@ import { SessionStatus } from "../enums/session.status";
|
|
|
7
7
|
* Interface for session configuration percentages
|
|
8
8
|
*/
|
|
9
9
|
export interface ISessionConfig {
|
|
10
|
+
originalDoctorConsultationFeePerHour: number;
|
|
11
|
+
platformPercentage: number;
|
|
10
12
|
collectionPercentage: number;
|
|
11
|
-
|
|
13
|
+
disbursementPercentage: number;
|
|
12
14
|
}
|
|
13
15
|
/**
|
|
14
16
|
* Session interface
|
package/build/models/session.js
CHANGED
|
@@ -22,9 +22,11 @@ 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
|
-
}, totalPrice: { type: Number, required: true }, doctorPrice: { type: Number, required: true }, platformPrice: { type: Number, required: true }, paymentApiPrice: { type: Number, required: true },
|
|
25
|
+
}, totalPrice: { type: Number, required: true }, doctorPrice: { type: Number, required: true }, platformPrice: { type: Number, required: true }, paymentApiPrice: { type: Number, required: true }, config: {
|
|
26
|
+
originalDoctorConsultationFeePerHour: { type: Number, required: true },
|
|
27
|
+
platformPercentage: { type: Number, required: true },
|
|
26
28
|
collectionPercentage: { type: Number, required: true },
|
|
27
|
-
|
|
28
|
-
} }));
|
|
29
|
+
disbursementPercentage: { type: Number, required: true },
|
|
30
|
+
}, hasDoctorCollected: { type: Boolean, required: true, default: false }, hasPlatformCollected: { type: Boolean, required: true, default: false } }));
|
|
29
31
|
SessionSchema.plugin(base_1.BaseSchemaPlugin);
|
|
30
32
|
exports.SessionModel = (0, mongoose_1.model)("Session", SessionSchema);
|