@experts_hub/shared 1.0.716 → 1.0.718
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/dist/entities/company-member.entity.d.ts +11 -0
- package/dist/entities/freelancer-profile.entity.d.ts +5 -0
- package/dist/entities/index.d.ts +1 -0
- package/dist/entities/user.entity.d.ts +2 -0
- package/dist/index.d.mts +17 -1
- package/dist/index.d.ts +17 -1
- package/dist/index.js +688 -637
- package/dist/index.mjs +567 -517
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1063,13 +1063,13 @@ import { IsEnum as IsEnum14 } from "class-validator";
|
|
|
1063
1063
|
|
|
1064
1064
|
// src/entities/user.entity.ts
|
|
1065
1065
|
import {
|
|
1066
|
-
Entity as
|
|
1067
|
-
Column as
|
|
1066
|
+
Entity as Entity79,
|
|
1067
|
+
Column as Column80,
|
|
1068
1068
|
OneToMany as OneToMany27,
|
|
1069
1069
|
OneToOne as OneToOne12,
|
|
1070
|
-
Index as
|
|
1071
|
-
ManyToOne as
|
|
1072
|
-
JoinColumn as
|
|
1070
|
+
Index as Index70,
|
|
1071
|
+
ManyToOne as ManyToOne74,
|
|
1072
|
+
JoinColumn as JoinColumn75
|
|
1073
1073
|
} from "typeorm";
|
|
1074
1074
|
|
|
1075
1075
|
// src/entities/base.entity.ts
|
|
@@ -1801,8 +1801,11 @@ __decorateClass([
|
|
|
1801
1801
|
Column9({ name: "resume_url", type: "text", nullable: true })
|
|
1802
1802
|
], FreelancerProfile.prototype, "resumeUrl", 2);
|
|
1803
1803
|
__decorateClass([
|
|
1804
|
-
Column9({ name: "resume_uploaded_on", type: "timestamp with time zone", nullable: true })
|
|
1804
|
+
Column9({ name: "resume_uploaded_on", type: "timestamp with time zone", nullable: true, comment: "The date and time when the resume was uploaded" })
|
|
1805
1805
|
], FreelancerProfile.prototype, "resumeUploadedOn", 2);
|
|
1806
|
+
__decorateClass([
|
|
1807
|
+
Column9({ name: "resume_parsed_on", type: "timestamp with time zone", nullable: true, comment: "The date and time when the resume was parsed" })
|
|
1808
|
+
], FreelancerProfile.prototype, "resumeParsedOn", 2);
|
|
1806
1809
|
__decorateClass([
|
|
1807
1810
|
Column9({ name: "resume_eligibility", type: "varchar", nullable: true })
|
|
1808
1811
|
], FreelancerProfile.prototype, "resumeEligibility", 2);
|
|
@@ -1820,6 +1823,12 @@ __decorateClass([
|
|
|
1820
1823
|
__decorateClass([
|
|
1821
1824
|
Column9({ name: "mcq_score", type: "float", nullable: true })
|
|
1822
1825
|
], FreelancerProfile.prototype, "mcqScore", 2);
|
|
1826
|
+
__decorateClass([
|
|
1827
|
+
Column9({ name: "mcq_initiated_on", type: "timestamp with time zone", nullable: true, comment: "The date and time when the MCQ assessment was initiated" })
|
|
1828
|
+
], FreelancerProfile.prototype, "mcqInitiatedOn", 2);
|
|
1829
|
+
__decorateClass([
|
|
1830
|
+
Column9({ name: "mcq_completed_on", type: "timestamp with time zone", nullable: true, comment: "The date and time when the MCQ assessment was completed" })
|
|
1831
|
+
], FreelancerProfile.prototype, "mcqCompletedOn", 2);
|
|
1823
1832
|
__decorateClass([
|
|
1824
1833
|
Column9({ name: "is_eligible_for_ai_assessment", type: "boolean", nullable: true })
|
|
1825
1834
|
], FreelancerProfile.prototype, "isEligibleForAiAssessment", 2);
|
|
@@ -1945,6 +1954,12 @@ __decorateClass([
|
|
|
1945
1954
|
}
|
|
1946
1955
|
})
|
|
1947
1956
|
], FreelancerProfile.prototype, "profileCompletedPercentage", 2);
|
|
1957
|
+
__decorateClass([
|
|
1958
|
+
Column9({ name: "profile_question_completed_on", type: "timestamp with time zone", nullable: true, comment: "The date and time when the profile question was completed" })
|
|
1959
|
+
], FreelancerProfile.prototype, "profileQuestionCompletedOn", 2);
|
|
1960
|
+
__decorateClass([
|
|
1961
|
+
Column9({ name: "profile_completed_on", type: "timestamp with time zone", nullable: true, comment: "The date and time when the profile was completed" })
|
|
1962
|
+
], FreelancerProfile.prototype, "profileCompletedOn", 2);
|
|
1948
1963
|
__decorateClass([
|
|
1949
1964
|
Column9({ name: "original_document_url", type: "varchar", nullable: true })
|
|
1950
1965
|
], FreelancerProfile.prototype, "originalDocumentUrl", 2);
|
|
@@ -5610,26 +5625,57 @@ CompanyMemberRole = __decorateClass([
|
|
|
5610
5625
|
Entity57("company_member_roles")
|
|
5611
5626
|
], CompanyMemberRole);
|
|
5612
5627
|
|
|
5628
|
+
// src/entities/company-member.entity.ts
|
|
5629
|
+
import { Column as Column59, Entity as Entity58, Index as Index51, JoinColumn as JoinColumn56, ManyToOne as ManyToOne56 } from "typeorm";
|
|
5630
|
+
var CompanyMember = class extends BaseEntity {
|
|
5631
|
+
};
|
|
5632
|
+
__decorateClass([
|
|
5633
|
+
Column59({ name: "user_id", type: "integer", unique: true })
|
|
5634
|
+
], CompanyMember.prototype, "userId", 2);
|
|
5635
|
+
__decorateClass([
|
|
5636
|
+
ManyToOne56(() => User, (user) => user.companyMember),
|
|
5637
|
+
JoinColumn56({ name: "user_id" })
|
|
5638
|
+
], CompanyMember.prototype, "user", 2);
|
|
5639
|
+
__decorateClass([
|
|
5640
|
+
Column59({ name: "first_name", type: "varchar", length: 100, nullable: true })
|
|
5641
|
+
], CompanyMember.prototype, "firstName", 2);
|
|
5642
|
+
__decorateClass([
|
|
5643
|
+
Column59({ name: "last_name", type: "varchar", length: 100, nullable: true })
|
|
5644
|
+
], CompanyMember.prototype, "lastName", 2);
|
|
5645
|
+
__decorateClass([
|
|
5646
|
+
Column59({ name: "email", type: "varchar", nullable: true }),
|
|
5647
|
+
Index51()
|
|
5648
|
+
], CompanyMember.prototype, "email", 2);
|
|
5649
|
+
__decorateClass([
|
|
5650
|
+
Column59({ name: "is_eligibl_for_recruiter_acknowledgement", type: "boolean", default: false })
|
|
5651
|
+
], CompanyMember.prototype, "isEligibleForRecruiterAcknowledgement", 2);
|
|
5652
|
+
__decorateClass([
|
|
5653
|
+
Column59({ name: "is_recruiter_platform_acknowledgement_accepted", type: "boolean", default: false })
|
|
5654
|
+
], CompanyMember.prototype, "isRecruiterPlatformAcknowledgementAccepted", 2);
|
|
5655
|
+
CompanyMember = __decorateClass([
|
|
5656
|
+
Entity58("company_members")
|
|
5657
|
+
], CompanyMember);
|
|
5658
|
+
|
|
5613
5659
|
// src/entities/assessment-answer.entity.ts
|
|
5614
5660
|
import {
|
|
5615
|
-
Entity as
|
|
5616
|
-
Column as
|
|
5617
|
-
ManyToOne as
|
|
5618
|
-
Index as
|
|
5619
|
-
JoinColumn as
|
|
5661
|
+
Entity as Entity61,
|
|
5662
|
+
Column as Column62,
|
|
5663
|
+
ManyToOne as ManyToOne59,
|
|
5664
|
+
Index as Index54,
|
|
5665
|
+
JoinColumn as JoinColumn59
|
|
5620
5666
|
} from "typeorm";
|
|
5621
5667
|
|
|
5622
5668
|
// src/entities/assessment-question.entity.ts
|
|
5623
|
-
import { Entity as
|
|
5669
|
+
import { Entity as Entity60, Column as Column61, OneToMany as OneToMany20, Index as Index53, ManyToOne as ManyToOne58, JoinColumn as JoinColumn58 } from "typeorm";
|
|
5624
5670
|
|
|
5625
5671
|
// src/entities/assessment-question-option.entity.ts
|
|
5626
5672
|
import {
|
|
5627
|
-
Entity as
|
|
5628
|
-
Column as
|
|
5673
|
+
Entity as Entity59,
|
|
5674
|
+
Column as Column60,
|
|
5629
5675
|
OneToMany as OneToMany19,
|
|
5630
|
-
ManyToOne as
|
|
5631
|
-
Index as
|
|
5632
|
-
JoinColumn as
|
|
5676
|
+
ManyToOne as ManyToOne57,
|
|
5677
|
+
Index as Index52,
|
|
5678
|
+
JoinColumn as JoinColumn57
|
|
5633
5679
|
} from "typeorm";
|
|
5634
5680
|
var AnswerTypeEnum = /* @__PURE__ */ ((AnswerTypeEnum2) => {
|
|
5635
5681
|
AnswerTypeEnum2["CORRECT"] = "CORRECT";
|
|
@@ -5640,23 +5686,23 @@ var AnswerTypeEnum = /* @__PURE__ */ ((AnswerTypeEnum2) => {
|
|
|
5640
5686
|
var AssessmetQuestionOption = class extends BaseEntity {
|
|
5641
5687
|
};
|
|
5642
5688
|
__decorateClass([
|
|
5643
|
-
|
|
5644
|
-
|
|
5689
|
+
Column60({ name: "question_id", type: "integer", nullable: true }),
|
|
5690
|
+
Index52()
|
|
5645
5691
|
], AssessmetQuestionOption.prototype, "questionId", 2);
|
|
5646
5692
|
__decorateClass([
|
|
5647
|
-
|
|
5693
|
+
ManyToOne57(
|
|
5648
5694
|
() => AssessmetQuestion,
|
|
5649
5695
|
(assessmentQuestion) => assessmentQuestion.options,
|
|
5650
5696
|
{ onDelete: "CASCADE" }
|
|
5651
5697
|
// ✅ IMPORTANT
|
|
5652
5698
|
),
|
|
5653
|
-
|
|
5699
|
+
JoinColumn57({ name: "question_id" })
|
|
5654
5700
|
], AssessmetQuestionOption.prototype, "question", 2);
|
|
5655
5701
|
__decorateClass([
|
|
5656
|
-
|
|
5702
|
+
Column60({ name: "text", type: "varchar", nullable: true })
|
|
5657
5703
|
], AssessmetQuestionOption.prototype, "text", 2);
|
|
5658
5704
|
__decorateClass([
|
|
5659
|
-
|
|
5705
|
+
Column60({
|
|
5660
5706
|
name: "answer_type",
|
|
5661
5707
|
type: "enum",
|
|
5662
5708
|
enum: AnswerTypeEnum,
|
|
@@ -5664,13 +5710,13 @@ __decorateClass([
|
|
|
5664
5710
|
})
|
|
5665
5711
|
], AssessmetQuestionOption.prototype, "answerType", 2);
|
|
5666
5712
|
__decorateClass([
|
|
5667
|
-
|
|
5713
|
+
Column60({ name: "is_active", type: "boolean", default: true })
|
|
5668
5714
|
], AssessmetQuestionOption.prototype, "isActive", 2);
|
|
5669
5715
|
__decorateClass([
|
|
5670
5716
|
OneToMany19(() => AssessmentAnswer, (assessmentAnswer) => assessmentAnswer.option)
|
|
5671
5717
|
], AssessmetQuestionOption.prototype, "selectedOptions", 2);
|
|
5672
5718
|
AssessmetQuestionOption = __decorateClass([
|
|
5673
|
-
|
|
5719
|
+
Entity59("assessment_question_options")
|
|
5674
5720
|
], AssessmetQuestionOption);
|
|
5675
5721
|
|
|
5676
5722
|
// src/entities/assessment-question.entity.ts
|
|
@@ -5682,10 +5728,10 @@ var QuestionForEnum = /* @__PURE__ */ ((QuestionForEnum2) => {
|
|
|
5682
5728
|
var AssessmetQuestion = class extends BaseEntity {
|
|
5683
5729
|
};
|
|
5684
5730
|
__decorateClass([
|
|
5685
|
-
|
|
5731
|
+
Column61({ name: "text", type: "varchar", nullable: true })
|
|
5686
5732
|
], AssessmetQuestion.prototype, "text", 2);
|
|
5687
5733
|
__decorateClass([
|
|
5688
|
-
|
|
5734
|
+
Column61({
|
|
5689
5735
|
name: "question_for",
|
|
5690
5736
|
type: "enum",
|
|
5691
5737
|
enum: QuestionForEnum,
|
|
@@ -5693,15 +5739,15 @@ __decorateClass([
|
|
|
5693
5739
|
})
|
|
5694
5740
|
], AssessmetQuestion.prototype, "questionFor", 2);
|
|
5695
5741
|
__decorateClass([
|
|
5696
|
-
|
|
5742
|
+
Column61({ name: "is_active", type: "boolean", default: true })
|
|
5697
5743
|
], AssessmetQuestion.prototype, "isActive", 2);
|
|
5698
5744
|
__decorateClass([
|
|
5699
|
-
|
|
5700
|
-
|
|
5745
|
+
Column61({ name: "candidate_id", type: "integer", nullable: true }),
|
|
5746
|
+
Index53()
|
|
5701
5747
|
], AssessmetQuestion.prototype, "candidateId", 2);
|
|
5702
5748
|
__decorateClass([
|
|
5703
|
-
|
|
5704
|
-
|
|
5749
|
+
ManyToOne58(() => User, (user) => user.freelancerMcq, { nullable: true }),
|
|
5750
|
+
JoinColumn58({ name: "candidate_id" })
|
|
5705
5751
|
], AssessmetQuestion.prototype, "candidate", 2);
|
|
5706
5752
|
__decorateClass([
|
|
5707
5753
|
OneToMany20(() => AssessmetQuestionOption, (assessmentQuestionOption) => assessmentQuestionOption.question)
|
|
@@ -5710,7 +5756,7 @@ __decorateClass([
|
|
|
5710
5756
|
OneToMany20(() => AssessmentAnswer, (assessmentAnswer) => assessmentAnswer.question)
|
|
5711
5757
|
], AssessmetQuestion.prototype, "answers", 2);
|
|
5712
5758
|
AssessmetQuestion = __decorateClass([
|
|
5713
|
-
|
|
5759
|
+
Entity60("assessment_questions")
|
|
5714
5760
|
], AssessmetQuestion);
|
|
5715
5761
|
|
|
5716
5762
|
// src/entities/assessment-answer.entity.ts
|
|
@@ -5723,106 +5769,106 @@ var SelectedAnswerTypeEnum = /* @__PURE__ */ ((SelectedAnswerTypeEnum2) => {
|
|
|
5723
5769
|
var AssessmentAnswer = class extends BaseEntity {
|
|
5724
5770
|
};
|
|
5725
5771
|
__decorateClass([
|
|
5726
|
-
|
|
5727
|
-
|
|
5772
|
+
Column62({ name: "user_id", type: "integer" }),
|
|
5773
|
+
Index54()
|
|
5728
5774
|
], AssessmentAnswer.prototype, "userId", 2);
|
|
5729
5775
|
__decorateClass([
|
|
5730
|
-
|
|
5731
|
-
|
|
5776
|
+
ManyToOne59(() => User, (user) => user.assessmentAnswers),
|
|
5777
|
+
JoinColumn59({ name: "user_id" })
|
|
5732
5778
|
], AssessmentAnswer.prototype, "user", 2);
|
|
5733
5779
|
__decorateClass([
|
|
5734
|
-
|
|
5735
|
-
|
|
5780
|
+
Column62({ name: "question_id", type: "integer" }),
|
|
5781
|
+
Index54()
|
|
5736
5782
|
], AssessmentAnswer.prototype, "questionId", 2);
|
|
5737
5783
|
__decorateClass([
|
|
5738
|
-
|
|
5784
|
+
ManyToOne59(
|
|
5739
5785
|
() => AssessmetQuestion,
|
|
5740
5786
|
(assessmentQuestion) => assessmentQuestion.answers,
|
|
5741
5787
|
{ onDelete: "CASCADE" }
|
|
5742
5788
|
// ✅ IMPORTANT
|
|
5743
5789
|
),
|
|
5744
|
-
|
|
5790
|
+
JoinColumn59({ name: "question_id" })
|
|
5745
5791
|
], AssessmentAnswer.prototype, "question", 2);
|
|
5746
5792
|
__decorateClass([
|
|
5747
|
-
|
|
5748
|
-
|
|
5793
|
+
Column62({ name: "selected_option_id", type: "integer" }),
|
|
5794
|
+
Index54()
|
|
5749
5795
|
], AssessmentAnswer.prototype, "selectedOptionId", 2);
|
|
5750
5796
|
__decorateClass([
|
|
5751
|
-
|
|
5797
|
+
ManyToOne59(
|
|
5752
5798
|
() => AssessmetQuestionOption,
|
|
5753
5799
|
(assessmentQuestionOption) => assessmentQuestionOption.selectedOptions,
|
|
5754
5800
|
{ onDelete: "CASCADE" }
|
|
5755
5801
|
// ✅ IMPORTANT
|
|
5756
5802
|
),
|
|
5757
|
-
|
|
5803
|
+
JoinColumn59({ name: "selected_option_id" })
|
|
5758
5804
|
], AssessmentAnswer.prototype, "option", 2);
|
|
5759
5805
|
__decorateClass([
|
|
5760
|
-
|
|
5806
|
+
Column62({
|
|
5761
5807
|
name: "selected_answer_type",
|
|
5762
5808
|
type: "enum",
|
|
5763
5809
|
enum: SelectedAnswerTypeEnum
|
|
5764
5810
|
})
|
|
5765
5811
|
], AssessmentAnswer.prototype, "selectedAnswerType", 2);
|
|
5766
5812
|
__decorateClass([
|
|
5767
|
-
|
|
5813
|
+
Column62({ name: "score", type: "float" })
|
|
5768
5814
|
], AssessmentAnswer.prototype, "score", 2);
|
|
5769
5815
|
AssessmentAnswer = __decorateClass([
|
|
5770
|
-
|
|
5816
|
+
Entity61("assessment_answers")
|
|
5771
5817
|
], AssessmentAnswer);
|
|
5772
5818
|
|
|
5773
5819
|
// src/entities/company-skill.entity.ts
|
|
5774
|
-
import { Entity as
|
|
5820
|
+
import { Entity as Entity62, Column as Column63, Index as Index55, ManyToOne as ManyToOne60, JoinColumn as JoinColumn60 } from "typeorm";
|
|
5775
5821
|
var CompanySkill = class extends BaseEntity {
|
|
5776
5822
|
};
|
|
5777
5823
|
// individual index to find core skills by user
|
|
5778
5824
|
__decorateClass([
|
|
5779
|
-
|
|
5780
|
-
|
|
5825
|
+
Column63({ name: "user_id", type: "integer", nullable: true }),
|
|
5826
|
+
Index55()
|
|
5781
5827
|
], CompanySkill.prototype, "userId", 2);
|
|
5782
5828
|
__decorateClass([
|
|
5783
|
-
|
|
5784
|
-
|
|
5829
|
+
ManyToOne60(() => User, (user) => user.companySkills),
|
|
5830
|
+
JoinColumn60({ name: "user_id" })
|
|
5785
5831
|
], CompanySkill.prototype, "user", 2);
|
|
5786
5832
|
__decorateClass([
|
|
5787
|
-
|
|
5833
|
+
Column63({ name: "skill_name", type: "varchar", nullable: true })
|
|
5788
5834
|
], CompanySkill.prototype, "skillName", 2);
|
|
5789
5835
|
CompanySkill = __decorateClass([
|
|
5790
|
-
|
|
5836
|
+
Entity62("company_skills")
|
|
5791
5837
|
], CompanySkill);
|
|
5792
5838
|
|
|
5793
5839
|
// src/entities/admin-user-role.entity.ts
|
|
5794
|
-
import { Entity as
|
|
5840
|
+
import { Entity as Entity66, Column as Column67, ManyToOne as ManyToOne62, JoinColumn as JoinColumn62 } from "typeorm";
|
|
5795
5841
|
|
|
5796
5842
|
// src/entities/admin-role.entity.ts
|
|
5797
|
-
import { Entity as
|
|
5843
|
+
import { Entity as Entity65, Column as Column66, Index as Index58, OneToMany as OneToMany23 } from "typeorm";
|
|
5798
5844
|
|
|
5799
5845
|
// src/entities/admin-role-permission.entity.ts
|
|
5800
|
-
import { Entity as
|
|
5846
|
+
import { Entity as Entity64, Column as Column65, ManyToOne as ManyToOne61, JoinColumn as JoinColumn61 } from "typeorm";
|
|
5801
5847
|
|
|
5802
5848
|
// src/entities/admin-permission.entity.ts
|
|
5803
|
-
import { Entity as
|
|
5849
|
+
import { Entity as Entity63, Column as Column64, Index as Index56, OneToMany as OneToMany22 } from "typeorm";
|
|
5804
5850
|
var AdminPermission = class extends BaseEntity {
|
|
5805
5851
|
};
|
|
5806
5852
|
__decorateClass([
|
|
5807
|
-
|
|
5853
|
+
Column64({ name: "permission_name", type: "varchar", nullable: true })
|
|
5808
5854
|
], AdminPermission.prototype, "permissionName", 2);
|
|
5809
5855
|
__decorateClass([
|
|
5810
|
-
|
|
5856
|
+
Column64({
|
|
5811
5857
|
name: "permission_slug",
|
|
5812
5858
|
type: "varchar",
|
|
5813
5859
|
unique: true,
|
|
5814
5860
|
nullable: true
|
|
5815
5861
|
}),
|
|
5816
|
-
|
|
5862
|
+
Index56()
|
|
5817
5863
|
], AdminPermission.prototype, "permissionSlug", 2);
|
|
5818
5864
|
__decorateClass([
|
|
5819
|
-
|
|
5865
|
+
Column64({ name: "permission_description", type: "varchar", nullable: true })
|
|
5820
5866
|
], AdminPermission.prototype, "permissionDescription", 2);
|
|
5821
5867
|
__decorateClass([
|
|
5822
|
-
|
|
5868
|
+
Column64({ name: "module", type: "varchar", nullable: true })
|
|
5823
5869
|
], AdminPermission.prototype, "module", 2);
|
|
5824
5870
|
__decorateClass([
|
|
5825
|
-
|
|
5871
|
+
Column64({ name: "is_active", type: "boolean", default: true })
|
|
5826
5872
|
], AdminPermission.prototype, "isActive", 2);
|
|
5827
5873
|
__decorateClass([
|
|
5828
5874
|
OneToMany22(
|
|
@@ -5831,14 +5877,14 @@ __decorateClass([
|
|
|
5831
5877
|
)
|
|
5832
5878
|
], AdminPermission.prototype, "adminRole", 2);
|
|
5833
5879
|
AdminPermission = __decorateClass([
|
|
5834
|
-
|
|
5880
|
+
Entity63("admin_permissions")
|
|
5835
5881
|
], AdminPermission);
|
|
5836
5882
|
|
|
5837
5883
|
// src/entities/admin-role-permission.entity.ts
|
|
5838
5884
|
var AdminRolePermission = class extends BaseEntity {
|
|
5839
5885
|
};
|
|
5840
5886
|
__decorateClass([
|
|
5841
|
-
|
|
5887
|
+
Column65({
|
|
5842
5888
|
name: "role_id",
|
|
5843
5889
|
type: "int",
|
|
5844
5890
|
nullable: true,
|
|
@@ -5846,11 +5892,11 @@ __decorateClass([
|
|
|
5846
5892
|
})
|
|
5847
5893
|
], AdminRolePermission.prototype, "roleId", 2);
|
|
5848
5894
|
__decorateClass([
|
|
5849
|
-
|
|
5850
|
-
|
|
5895
|
+
ManyToOne61(() => AdminRole),
|
|
5896
|
+
JoinColumn61({ name: "role_id" })
|
|
5851
5897
|
], AdminRolePermission.prototype, "adminRole", 2);
|
|
5852
5898
|
__decorateClass([
|
|
5853
|
-
|
|
5899
|
+
Column65({
|
|
5854
5900
|
name: "permission_id",
|
|
5855
5901
|
type: "int",
|
|
5856
5902
|
nullable: true,
|
|
@@ -5858,28 +5904,28 @@ __decorateClass([
|
|
|
5858
5904
|
})
|
|
5859
5905
|
], AdminRolePermission.prototype, "permissionId", 2);
|
|
5860
5906
|
__decorateClass([
|
|
5861
|
-
|
|
5862
|
-
|
|
5907
|
+
ManyToOne61(() => AdminPermission),
|
|
5908
|
+
JoinColumn61({ name: "permission_id" })
|
|
5863
5909
|
], AdminRolePermission.prototype, "adminPermissions", 2);
|
|
5864
5910
|
AdminRolePermission = __decorateClass([
|
|
5865
|
-
|
|
5911
|
+
Entity64("admin_role_permissions")
|
|
5866
5912
|
], AdminRolePermission);
|
|
5867
5913
|
|
|
5868
5914
|
// src/entities/admin-role.entity.ts
|
|
5869
5915
|
var AdminRole = class extends BaseEntity {
|
|
5870
5916
|
};
|
|
5871
5917
|
__decorateClass([
|
|
5872
|
-
|
|
5918
|
+
Column66({ name: "role_name", type: "varchar", nullable: true })
|
|
5873
5919
|
], AdminRole.prototype, "roleName", 2);
|
|
5874
5920
|
__decorateClass([
|
|
5875
|
-
|
|
5876
|
-
|
|
5921
|
+
Column66({ name: "role_slug", type: "varchar", unique: true, nullable: true }),
|
|
5922
|
+
Index58()
|
|
5877
5923
|
], AdminRole.prototype, "roleSlug", 2);
|
|
5878
5924
|
__decorateClass([
|
|
5879
|
-
|
|
5925
|
+
Column66({ name: "role_description", type: "varchar", nullable: true })
|
|
5880
5926
|
], AdminRole.prototype, "roleDescription", 2);
|
|
5881
5927
|
__decorateClass([
|
|
5882
|
-
|
|
5928
|
+
Column66({ name: "is_active", type: "boolean", default: true })
|
|
5883
5929
|
], AdminRole.prototype, "isActive", 2);
|
|
5884
5930
|
__decorateClass([
|
|
5885
5931
|
OneToMany23(
|
|
@@ -5891,14 +5937,14 @@ __decorateClass([
|
|
|
5891
5937
|
OneToMany23(() => AdminUserRole, (adminUserRole) => adminUserRole.adminRole)
|
|
5892
5938
|
], AdminRole.prototype, "userRoles", 2);
|
|
5893
5939
|
AdminRole = __decorateClass([
|
|
5894
|
-
|
|
5940
|
+
Entity65("admin_roles")
|
|
5895
5941
|
], AdminRole);
|
|
5896
5942
|
|
|
5897
5943
|
// src/entities/admin-user-role.entity.ts
|
|
5898
5944
|
var AdminUserRole = class extends BaseEntity {
|
|
5899
5945
|
};
|
|
5900
5946
|
__decorateClass([
|
|
5901
|
-
|
|
5947
|
+
Column67({
|
|
5902
5948
|
name: "user_id",
|
|
5903
5949
|
type: "int",
|
|
5904
5950
|
nullable: true,
|
|
@@ -5906,11 +5952,11 @@ __decorateClass([
|
|
|
5906
5952
|
})
|
|
5907
5953
|
], AdminUserRole.prototype, "userId", 2);
|
|
5908
5954
|
__decorateClass([
|
|
5909
|
-
|
|
5910
|
-
|
|
5955
|
+
ManyToOne62(() => User),
|
|
5956
|
+
JoinColumn62({ name: "user_id" })
|
|
5911
5957
|
], AdminUserRole.prototype, "user", 2);
|
|
5912
5958
|
__decorateClass([
|
|
5913
|
-
|
|
5959
|
+
Column67({
|
|
5914
5960
|
name: "role_id",
|
|
5915
5961
|
type: "int",
|
|
5916
5962
|
nullable: true,
|
|
@@ -5918,70 +5964,70 @@ __decorateClass([
|
|
|
5918
5964
|
})
|
|
5919
5965
|
], AdminUserRole.prototype, "roleId", 2);
|
|
5920
5966
|
__decorateClass([
|
|
5921
|
-
|
|
5922
|
-
|
|
5967
|
+
ManyToOne62(() => AdminRole),
|
|
5968
|
+
JoinColumn62({ name: "role_id" })
|
|
5923
5969
|
], AdminUserRole.prototype, "adminRole", 2);
|
|
5924
5970
|
AdminUserRole = __decorateClass([
|
|
5925
|
-
|
|
5971
|
+
Entity66("admin_user_roles")
|
|
5926
5972
|
], AdminUserRole);
|
|
5927
5973
|
|
|
5928
5974
|
// src/entities/freelancer-resume.entity.ts
|
|
5929
5975
|
import {
|
|
5930
|
-
Entity as
|
|
5931
|
-
Column as
|
|
5932
|
-
Index as
|
|
5933
|
-
ManyToOne as
|
|
5934
|
-
JoinColumn as
|
|
5976
|
+
Entity as Entity67,
|
|
5977
|
+
Column as Column68,
|
|
5978
|
+
Index as Index60,
|
|
5979
|
+
ManyToOne as ManyToOne63,
|
|
5980
|
+
JoinColumn as JoinColumn63
|
|
5935
5981
|
} from "typeorm";
|
|
5936
5982
|
var FreelancerResume = class extends BaseEntity {
|
|
5937
5983
|
};
|
|
5938
5984
|
// individual index to find profile by user
|
|
5939
5985
|
__decorateClass([
|
|
5940
|
-
|
|
5941
|
-
|
|
5986
|
+
Column68({ name: "user_id", type: "integer", nullable: true }),
|
|
5987
|
+
Index60()
|
|
5942
5988
|
], FreelancerResume.prototype, "userId", 2);
|
|
5943
5989
|
__decorateClass([
|
|
5944
|
-
|
|
5945
|
-
|
|
5990
|
+
ManyToOne63(() => User, (user) => user.freelancerProfile),
|
|
5991
|
+
JoinColumn63({ name: "user_id" })
|
|
5946
5992
|
], FreelancerResume.prototype, "user", 2);
|
|
5947
5993
|
__decorateClass([
|
|
5948
|
-
|
|
5994
|
+
Column68({ name: "resume_data", type: "jsonb", nullable: true })
|
|
5949
5995
|
], FreelancerResume.prototype, "resumeData", 2);
|
|
5950
5996
|
__decorateClass([
|
|
5951
|
-
|
|
5997
|
+
Column68({ name: "processed_resume_data", type: "jsonb", nullable: true })
|
|
5952
5998
|
], FreelancerResume.prototype, "processedResumeData", 2);
|
|
5953
5999
|
FreelancerResume = __decorateClass([
|
|
5954
|
-
|
|
6000
|
+
Entity67("freelancer_resumes")
|
|
5955
6001
|
], FreelancerResume);
|
|
5956
6002
|
|
|
5957
6003
|
// src/entities/signature.entity.ts
|
|
5958
6004
|
import {
|
|
5959
|
-
Entity as
|
|
5960
|
-
Column as
|
|
5961
|
-
Index as
|
|
5962
|
-
ManyToOne as
|
|
5963
|
-
JoinColumn as
|
|
6005
|
+
Entity as Entity68,
|
|
6006
|
+
Column as Column69,
|
|
6007
|
+
Index as Index61,
|
|
6008
|
+
ManyToOne as ManyToOne64,
|
|
6009
|
+
JoinColumn as JoinColumn64
|
|
5964
6010
|
} from "typeorm";
|
|
5965
6011
|
var Signature = class extends BaseEntity {
|
|
5966
6012
|
};
|
|
5967
6013
|
// individual index to find profile by user
|
|
5968
6014
|
__decorateClass([
|
|
5969
|
-
|
|
5970
|
-
|
|
6015
|
+
Column69({ name: "user_id", type: "integer", nullable: true }),
|
|
6016
|
+
Index61()
|
|
5971
6017
|
], Signature.prototype, "userId", 2);
|
|
5972
6018
|
__decorateClass([
|
|
5973
|
-
|
|
5974
|
-
|
|
6019
|
+
ManyToOne64(() => User, (user) => user.signatures),
|
|
6020
|
+
JoinColumn64({ name: "user_id" })
|
|
5975
6021
|
], Signature.prototype, "user", 2);
|
|
5976
6022
|
__decorateClass([
|
|
5977
|
-
|
|
6023
|
+
Column69({ name: "signature_url", type: "text", nullable: true })
|
|
5978
6024
|
], Signature.prototype, "signatureUrl", 2);
|
|
5979
6025
|
Signature = __decorateClass([
|
|
5980
|
-
|
|
6026
|
+
Entity68("signatures")
|
|
5981
6027
|
], Signature);
|
|
5982
6028
|
|
|
5983
6029
|
// src/entities/dispute.entity.ts
|
|
5984
|
-
import { Entity as
|
|
6030
|
+
import { Entity as Entity69, Column as Column70, Index as Index62, JoinColumn as JoinColumn65, ManyToOne as ManyToOne65 } from "typeorm";
|
|
5985
6031
|
var DisputeStatusEnum = /* @__PURE__ */ ((DisputeStatusEnum2) => {
|
|
5986
6032
|
DisputeStatusEnum2["OPEN"] = "OPEN";
|
|
5987
6033
|
DisputeStatusEnum2["IN_REVIEW"] = "IN_REVIEW";
|
|
@@ -6002,36 +6048,36 @@ var InitiatorTypeEnum = /* @__PURE__ */ ((InitiatorTypeEnum2) => {
|
|
|
6002
6048
|
var Dispute = class extends BaseEntity {
|
|
6003
6049
|
};
|
|
6004
6050
|
__decorateClass([
|
|
6005
|
-
|
|
6006
|
-
|
|
6051
|
+
Column70({ name: "client_id", type: "integer", nullable: true }),
|
|
6052
|
+
Index62()
|
|
6007
6053
|
], Dispute.prototype, "clientId", 2);
|
|
6008
6054
|
__decorateClass([
|
|
6009
|
-
|
|
6010
|
-
|
|
6055
|
+
ManyToOne65(() => User, (user) => user.clientDisputes),
|
|
6056
|
+
JoinColumn65({ name: "client_id" })
|
|
6011
6057
|
], Dispute.prototype, "client", 2);
|
|
6012
6058
|
__decorateClass([
|
|
6013
|
-
|
|
6014
|
-
|
|
6059
|
+
Column70({ name: "freelancer_id", type: "integer", nullable: true }),
|
|
6060
|
+
Index62()
|
|
6015
6061
|
], Dispute.prototype, "freelancerId", 2);
|
|
6016
6062
|
__decorateClass([
|
|
6017
|
-
|
|
6018
|
-
|
|
6063
|
+
ManyToOne65(() => User, (user) => user.freelancerDisputes),
|
|
6064
|
+
JoinColumn65({ name: "freelancer_id" })
|
|
6019
6065
|
], Dispute.prototype, "freelancer", 2);
|
|
6020
6066
|
__decorateClass([
|
|
6021
|
-
|
|
6067
|
+
Column70({ name: "dispute_unique_id", type: "varchar", unique: true })
|
|
6022
6068
|
], Dispute.prototype, "disputeUniqueId", 2);
|
|
6023
6069
|
__decorateClass([
|
|
6024
|
-
|
|
6025
|
-
|
|
6070
|
+
Column70({ name: "dispute_type", type: "varchar", nullable: true }),
|
|
6071
|
+
Index62()
|
|
6026
6072
|
], Dispute.prototype, "disputeType", 2);
|
|
6027
6073
|
__decorateClass([
|
|
6028
|
-
|
|
6074
|
+
Column70({ name: "description", type: "varchar", nullable: true })
|
|
6029
6075
|
], Dispute.prototype, "description", 2);
|
|
6030
6076
|
__decorateClass([
|
|
6031
|
-
|
|
6077
|
+
Column70({ name: "comment", type: "varchar", nullable: true })
|
|
6032
6078
|
], Dispute.prototype, "comment", 2);
|
|
6033
6079
|
__decorateClass([
|
|
6034
|
-
|
|
6080
|
+
Column70({
|
|
6035
6081
|
name: "status",
|
|
6036
6082
|
type: "enum",
|
|
6037
6083
|
enum: DisputeStatusEnum,
|
|
@@ -6039,7 +6085,7 @@ __decorateClass([
|
|
|
6039
6085
|
})
|
|
6040
6086
|
], Dispute.prototype, "status", 2);
|
|
6041
6087
|
__decorateClass([
|
|
6042
|
-
|
|
6088
|
+
Column70({
|
|
6043
6089
|
name: "initiator_type",
|
|
6044
6090
|
type: "enum",
|
|
6045
6091
|
enum: InitiatorTypeEnum,
|
|
@@ -6048,33 +6094,33 @@ __decorateClass([
|
|
|
6048
6094
|
})
|
|
6049
6095
|
], Dispute.prototype, "initiatorType", 2);
|
|
6050
6096
|
__decorateClass([
|
|
6051
|
-
|
|
6052
|
-
|
|
6097
|
+
Column70({ name: "initiator_id", type: "integer" }),
|
|
6098
|
+
Index62()
|
|
6053
6099
|
], Dispute.prototype, "initiatorId", 2);
|
|
6054
6100
|
__decorateClass([
|
|
6055
|
-
|
|
6056
|
-
|
|
6101
|
+
ManyToOne65(() => User, (user) => user.initiatedDisputes),
|
|
6102
|
+
JoinColumn65({ name: "initiator_id" })
|
|
6057
6103
|
], Dispute.prototype, "initiator", 2);
|
|
6058
6104
|
__decorateClass([
|
|
6059
|
-
|
|
6060
|
-
|
|
6105
|
+
Column70({ name: "respondent_id", type: "integer", nullable: true }),
|
|
6106
|
+
Index62()
|
|
6061
6107
|
], Dispute.prototype, "respondentId", 2);
|
|
6062
6108
|
__decorateClass([
|
|
6063
|
-
|
|
6064
|
-
|
|
6109
|
+
ManyToOne65(() => User, (user) => user.respondentDisputes, { nullable: true }),
|
|
6110
|
+
JoinColumn65({ name: "respondent_id" })
|
|
6065
6111
|
], Dispute.prototype, "respondent", 2);
|
|
6066
6112
|
__decorateClass([
|
|
6067
|
-
|
|
6113
|
+
Column70({ name: "attachments", type: "jsonb", nullable: true })
|
|
6068
6114
|
], Dispute.prototype, "attachments", 2);
|
|
6069
6115
|
__decorateClass([
|
|
6070
|
-
|
|
6116
|
+
Column70({ name: "dynamic_fields", type: "jsonb", nullable: true })
|
|
6071
6117
|
], Dispute.prototype, "dynamicFields", 2);
|
|
6072
6118
|
Dispute = __decorateClass([
|
|
6073
|
-
|
|
6119
|
+
Entity69("disputes")
|
|
6074
6120
|
], Dispute);
|
|
6075
6121
|
|
|
6076
6122
|
// src/entities/stripe-transaction.entity.ts
|
|
6077
|
-
import { Entity as
|
|
6123
|
+
import { Entity as Entity70, Column as Column71, Index as Index63, ManyToOne as ManyToOne66, JoinColumn as JoinColumn66 } from "typeorm";
|
|
6078
6124
|
var StripeTransactionTypeEnum = /* @__PURE__ */ ((StripeTransactionTypeEnum2) => {
|
|
6079
6125
|
StripeTransactionTypeEnum2["ADD_FUNDS"] = "ADD_FUNDS";
|
|
6080
6126
|
StripeTransactionTypeEnum2["TRANSFER"] = "TRANSFER";
|
|
@@ -6096,97 +6142,97 @@ var StripeTransaction = class extends BaseEntity {
|
|
|
6096
6142
|
// Full Stripe session response
|
|
6097
6143
|
};
|
|
6098
6144
|
__decorateClass([
|
|
6099
|
-
|
|
6100
|
-
|
|
6145
|
+
Column71({ name: "user_id", type: "integer", nullable: true }),
|
|
6146
|
+
Index63()
|
|
6101
6147
|
], StripeTransaction.prototype, "userId", 2);
|
|
6102
6148
|
__decorateClass([
|
|
6103
|
-
|
|
6104
|
-
|
|
6149
|
+
ManyToOne66(() => User, (user) => user.stripeTransactions),
|
|
6150
|
+
JoinColumn66({ name: "user_id" })
|
|
6105
6151
|
], StripeTransaction.prototype, "user", 2);
|
|
6106
6152
|
__decorateClass([
|
|
6107
|
-
|
|
6153
|
+
Column71({ name: "stripe_session_id", type: "varchar", nullable: true })
|
|
6108
6154
|
], StripeTransaction.prototype, "stripeSessionId", 2);
|
|
6109
6155
|
__decorateClass([
|
|
6110
|
-
|
|
6156
|
+
Column71({ name: "stripe_payment_intent_id", type: "varchar", nullable: true })
|
|
6111
6157
|
], StripeTransaction.prototype, "stripePaymentIntentId", 2);
|
|
6112
6158
|
__decorateClass([
|
|
6113
|
-
|
|
6159
|
+
Column71({ name: "stripe_charge_id", type: "varchar", nullable: true })
|
|
6114
6160
|
], StripeTransaction.prototype, "stripeChargeId", 2);
|
|
6115
6161
|
__decorateClass([
|
|
6116
|
-
|
|
6162
|
+
Column71({ name: "stripe_receipt_url", type: "varchar", nullable: true })
|
|
6117
6163
|
], StripeTransaction.prototype, "stripeReceiptUrl", 2);
|
|
6118
6164
|
__decorateClass([
|
|
6119
|
-
|
|
6165
|
+
Column71({ name: "stripe_balance_transaction_id", type: "varchar", nullable: true })
|
|
6120
6166
|
], StripeTransaction.prototype, "stripeBalanceTransactionId", 2);
|
|
6121
6167
|
__decorateClass([
|
|
6122
|
-
|
|
6168
|
+
Column71({ name: "stripe_payment_method", type: "varchar", nullable: true })
|
|
6123
6169
|
], StripeTransaction.prototype, "stripePaymentMethod", 2);
|
|
6124
6170
|
__decorateClass([
|
|
6125
|
-
|
|
6171
|
+
Column71({ name: "stripe_payment_status", type: "varchar", nullable: true })
|
|
6126
6172
|
], StripeTransaction.prototype, "stripePaymentStatus", 2);
|
|
6127
6173
|
__decorateClass([
|
|
6128
|
-
|
|
6174
|
+
Column71({ name: "type", type: "enum", enum: StripeTransactionTypeEnum })
|
|
6129
6175
|
], StripeTransaction.prototype, "type", 2);
|
|
6130
6176
|
__decorateClass([
|
|
6131
|
-
|
|
6177
|
+
Column71({ name: "currency", type: "varchar", nullable: true })
|
|
6132
6178
|
], StripeTransaction.prototype, "currency", 2);
|
|
6133
6179
|
__decorateClass([
|
|
6134
|
-
|
|
6180
|
+
Column71({ name: "desired_deposit_cents", type: "bigint", nullable: true, comment: "Amount user wants in their wallet. Example: 10000 cents = $100.00. This is what gets credited to wallet" })
|
|
6135
6181
|
], StripeTransaction.prototype, "desiredDepositCents", 2);
|
|
6136
6182
|
__decorateClass([
|
|
6137
|
-
|
|
6183
|
+
Column71({ name: "platform_fee_cents", type: "bigint", default: 0, comment: "Your platform commission Example: 500 cents = $5.00 (5% of $100)" })
|
|
6138
6184
|
], StripeTransaction.prototype, "platformFeeCents", 2);
|
|
6139
6185
|
__decorateClass([
|
|
6140
|
-
|
|
6186
|
+
Column71({ name: "tax_cents", type: "bigint", nullable: true, comment: "Sales tax collected by Stripe" })
|
|
6141
6187
|
], StripeTransaction.prototype, "taxCents", 2);
|
|
6142
6188
|
__decorateClass([
|
|
6143
|
-
|
|
6189
|
+
Column71({ name: "estimated_stripe_fee_cents", type: "bigint", nullable: true, comment: "Your calculated estimate of Stripe fee, Example: 371 cents = $3.71" })
|
|
6144
6190
|
], StripeTransaction.prototype, "estimatedStripeFee", 2);
|
|
6145
6191
|
__decorateClass([
|
|
6146
|
-
|
|
6192
|
+
Column71({ name: "estimated_total_cents", type: "bigint", nullable: true, comment: "Your calculated total to charge, Example: 11386 cents = $113.86, desired_deposit_cents + platform_fee_cents + estimated_stripe_fee" })
|
|
6147
6193
|
], StripeTransaction.prototype, "estimatedTotalCents", 2);
|
|
6148
6194
|
__decorateClass([
|
|
6149
|
-
|
|
6195
|
+
Column71({ name: "actual_stripe_fee_cents", type: "bigint", nullable: true, comment: "ACTUAL Stripe fee charged, Example: 371 cents = $3.71" })
|
|
6150
6196
|
], StripeTransaction.prototype, "actualStripeFee", 2);
|
|
6151
6197
|
__decorateClass([
|
|
6152
|
-
|
|
6198
|
+
Column71({ name: "actual_total_paid_cents", type: "bigint", nullable: true, comment: "What customer ACTUALLY paid, Example: 11757 cents = $117.57, May differ from estimate" })
|
|
6153
6199
|
], StripeTransaction.prototype, "actualTotalPaidCents", 2);
|
|
6154
6200
|
__decorateClass([
|
|
6155
|
-
|
|
6201
|
+
Column71({ name: "net_received_cents", type: "bigint", nullable: true, comment: "What YOU receive after Stripe fee Example: 11386 cents = $113.86. This is your actual revenue + user deposit" })
|
|
6156
6202
|
], StripeTransaction.prototype, "netReceivedCents", 2);
|
|
6157
6203
|
__decorateClass([
|
|
6158
|
-
|
|
6204
|
+
Column71({ name: "description", type: "text", nullable: true })
|
|
6159
6205
|
], StripeTransaction.prototype, "description", 2);
|
|
6160
6206
|
__decorateClass([
|
|
6161
|
-
|
|
6207
|
+
Column71({ name: "status", type: "enum", enum: StripeTransactionStatusEnum, default: "PENDING" /* PENDING */ })
|
|
6162
6208
|
], StripeTransaction.prototype, "status", 2);
|
|
6163
6209
|
__decorateClass([
|
|
6164
|
-
|
|
6210
|
+
Column71({ name: "checkout_session_completed_at", type: "timestamptz", nullable: true })
|
|
6165
6211
|
], StripeTransaction.prototype, "checkoutSessionCompletedAt", 2);
|
|
6166
6212
|
__decorateClass([
|
|
6167
|
-
|
|
6213
|
+
Column71({ name: "completed_at", type: "timestamptz", nullable: true })
|
|
6168
6214
|
], StripeTransaction.prototype, "completedAt", 2);
|
|
6169
6215
|
__decorateClass([
|
|
6170
|
-
|
|
6216
|
+
Column71({ name: "billing_details", type: "jsonb", nullable: true })
|
|
6171
6217
|
], StripeTransaction.prototype, "billingDetails", 2);
|
|
6172
6218
|
__decorateClass([
|
|
6173
|
-
|
|
6219
|
+
Column71({ name: "payment_method_details", type: "jsonb", nullable: true })
|
|
6174
6220
|
], StripeTransaction.prototype, "paymentMethodDetails", 2);
|
|
6175
6221
|
__decorateClass([
|
|
6176
|
-
|
|
6222
|
+
Column71({ name: "raw_session_payload", type: "jsonb", nullable: true })
|
|
6177
6223
|
], StripeTransaction.prototype, "rawSessionPayload", 2);
|
|
6178
6224
|
__decorateClass([
|
|
6179
|
-
|
|
6225
|
+
Column71({ name: "raw_session_response", type: "jsonb", nullable: true })
|
|
6180
6226
|
], StripeTransaction.prototype, "rawSessionResponse", 2);
|
|
6181
6227
|
StripeTransaction = __decorateClass([
|
|
6182
|
-
|
|
6228
|
+
Entity70("stripe_transactions")
|
|
6183
6229
|
], StripeTransaction);
|
|
6184
6230
|
|
|
6185
6231
|
// src/entities/wallet.entity.ts
|
|
6186
|
-
import { Entity as
|
|
6232
|
+
import { Entity as Entity72, Column as Column73, Index as Index65, JoinColumn as JoinColumn68, OneToOne as OneToOne11, OneToMany as OneToMany24 } from "typeorm";
|
|
6187
6233
|
|
|
6188
6234
|
// src/entities/wallet-transaction.entity.ts
|
|
6189
|
-
import { Entity as
|
|
6235
|
+
import { Entity as Entity71, Column as Column72, Index as Index64, ManyToOne as ManyToOne67, JoinColumn as JoinColumn67 } from "typeorm";
|
|
6190
6236
|
var WalletTransactionTypeEnum = /* @__PURE__ */ ((WalletTransactionTypeEnum2) => {
|
|
6191
6237
|
WalletTransactionTypeEnum2["CR"] = "CR";
|
|
6192
6238
|
WalletTransactionTypeEnum2["DR"] = "DR";
|
|
@@ -6203,46 +6249,46 @@ var WalletTransactionStatusEnum = /* @__PURE__ */ ((WalletTransactionStatusEnum2
|
|
|
6203
6249
|
var WalletTransaction = class extends BaseEntity {
|
|
6204
6250
|
};
|
|
6205
6251
|
__decorateClass([
|
|
6206
|
-
|
|
6207
|
-
|
|
6252
|
+
Column72({ name: "wallet_id", type: "integer", nullable: true }),
|
|
6253
|
+
Index64()
|
|
6208
6254
|
], WalletTransaction.prototype, "walletId", 2);
|
|
6209
6255
|
__decorateClass([
|
|
6210
|
-
|
|
6211
|
-
|
|
6256
|
+
ManyToOne67(() => Wallet, (wallet) => wallet.walletTransactions),
|
|
6257
|
+
JoinColumn67({ name: "wallet_id" })
|
|
6212
6258
|
], WalletTransaction.prototype, "wallet", 2);
|
|
6213
6259
|
__decorateClass([
|
|
6214
|
-
|
|
6260
|
+
Column72({ name: "amount", type: "bigint", nullable: true })
|
|
6215
6261
|
], WalletTransaction.prototype, "amount", 2);
|
|
6216
6262
|
__decorateClass([
|
|
6217
|
-
|
|
6263
|
+
Column72({ name: "balance_before", type: "bigint", nullable: true })
|
|
6218
6264
|
], WalletTransaction.prototype, "balanceBefore", 2);
|
|
6219
6265
|
__decorateClass([
|
|
6220
|
-
|
|
6266
|
+
Column72({ name: "balance_after", type: "bigint", nullable: true })
|
|
6221
6267
|
], WalletTransaction.prototype, "balanceAfter", 2);
|
|
6222
6268
|
__decorateClass([
|
|
6223
|
-
|
|
6269
|
+
Column72({ name: "type", type: "enum", enum: WalletTransactionTypeEnum })
|
|
6224
6270
|
], WalletTransaction.prototype, "type", 2);
|
|
6225
6271
|
__decorateClass([
|
|
6226
|
-
|
|
6272
|
+
Column72({ name: "status", type: "enum", enum: WalletTransactionStatusEnum, default: "PENDING" /* PENDING */ })
|
|
6227
6273
|
], WalletTransaction.prototype, "status", 2);
|
|
6228
6274
|
__decorateClass([
|
|
6229
|
-
|
|
6275
|
+
Column72({ name: "description", type: "text", nullable: true })
|
|
6230
6276
|
], WalletTransaction.prototype, "description", 2);
|
|
6231
6277
|
__decorateClass([
|
|
6232
|
-
|
|
6278
|
+
Column72({ name: "completed_at", type: "timestamptz", nullable: true })
|
|
6233
6279
|
], WalletTransaction.prototype, "completedAt", 2);
|
|
6234
6280
|
__decorateClass([
|
|
6235
|
-
|
|
6281
|
+
Column72({ name: "transaction_for", type: "varchar", nullable: true })
|
|
6236
6282
|
], WalletTransaction.prototype, "transactionFor", 2);
|
|
6237
6283
|
__decorateClass([
|
|
6238
|
-
|
|
6284
|
+
Column72({ name: "meta_data", type: "varchar", nullable: true })
|
|
6239
6285
|
], WalletTransaction.prototype, "metaData", 2);
|
|
6240
6286
|
__decorateClass([
|
|
6241
|
-
|
|
6242
|
-
|
|
6287
|
+
Column72({ name: "stripe_transaction_id", type: "integer", nullable: true }),
|
|
6288
|
+
Index64()
|
|
6243
6289
|
], WalletTransaction.prototype, "stripeTransactionId", 2);
|
|
6244
6290
|
WalletTransaction = __decorateClass([
|
|
6245
|
-
|
|
6291
|
+
Entity71("wallet_transactions")
|
|
6246
6292
|
], WalletTransaction);
|
|
6247
6293
|
|
|
6248
6294
|
// src/entities/wallet.entity.ts
|
|
@@ -6260,48 +6306,48 @@ var WalletOnboardingStatusEnum = /* @__PURE__ */ ((WalletOnboardingStatusEnum2)
|
|
|
6260
6306
|
var Wallet = class extends BaseEntity {
|
|
6261
6307
|
};
|
|
6262
6308
|
__decorateClass([
|
|
6263
|
-
|
|
6264
|
-
|
|
6309
|
+
Column73({ name: "user_id", type: "integer", nullable: true }),
|
|
6310
|
+
Index65()
|
|
6265
6311
|
], Wallet.prototype, "userId", 2);
|
|
6266
6312
|
__decorateClass([
|
|
6267
6313
|
OneToOne11(() => User, (user) => user.wallet),
|
|
6268
|
-
|
|
6314
|
+
JoinColumn68({ name: "user_id" })
|
|
6269
6315
|
], Wallet.prototype, "user", 2);
|
|
6270
6316
|
__decorateClass([
|
|
6271
|
-
|
|
6317
|
+
Column73({ name: "account_type", type: "enum", enum: WalletAccountTypeEnum, nullable: true })
|
|
6272
6318
|
], Wallet.prototype, "accountType", 2);
|
|
6273
6319
|
__decorateClass([
|
|
6274
|
-
|
|
6320
|
+
Column73({ name: "stripe_account_id", type: "varchar", nullable: true })
|
|
6275
6321
|
], Wallet.prototype, "stripeAccountId", 2);
|
|
6276
6322
|
__decorateClass([
|
|
6277
|
-
|
|
6323
|
+
Column73({ name: "stripe_customer_id", type: "varchar", nullable: true })
|
|
6278
6324
|
], Wallet.prototype, "stripeCustomerId", 2);
|
|
6279
6325
|
__decorateClass([
|
|
6280
|
-
|
|
6326
|
+
Column73({ name: "wallet_balance", type: "varchar", default: "0", comment: "This column is just used to show balance, It will not be used in any computation" })
|
|
6281
6327
|
], Wallet.prototype, "walletBalance", 2);
|
|
6282
6328
|
__decorateClass([
|
|
6283
|
-
|
|
6329
|
+
Column73({ name: "wallet_balance_cents", type: "bigint", default: 0, comment: "This column is used to store wallet balance in cents Example: 371 cents = $3.71, All computation will be handled by this column" })
|
|
6284
6330
|
], Wallet.prototype, "walletBalanceCents", 2);
|
|
6285
6331
|
__decorateClass([
|
|
6286
|
-
|
|
6332
|
+
Column73({ name: "onboarding_status", type: "enum", enum: WalletOnboardingStatusEnum, nullable: true })
|
|
6287
6333
|
], Wallet.prototype, "onboardingStatus", 2);
|
|
6288
6334
|
__decorateClass([
|
|
6289
|
-
|
|
6335
|
+
Column73({ name: "stripe_metadata", type: "jsonb", nullable: true })
|
|
6290
6336
|
], Wallet.prototype, "stripeMetadata", 2);
|
|
6291
6337
|
__decorateClass([
|
|
6292
6338
|
OneToMany24(() => WalletTransaction, (walletTransaction) => walletTransaction.wallet)
|
|
6293
6339
|
], Wallet.prototype, "walletTransactions", 2);
|
|
6294
6340
|
Wallet = __decorateClass([
|
|
6295
|
-
|
|
6341
|
+
Entity72("wallets")
|
|
6296
6342
|
], Wallet);
|
|
6297
6343
|
|
|
6298
6344
|
// src/entities/freelancer-assessment-request.entity.ts
|
|
6299
6345
|
import {
|
|
6300
|
-
Entity as
|
|
6301
|
-
Column as
|
|
6302
|
-
ManyToOne as
|
|
6303
|
-
Index as
|
|
6304
|
-
JoinColumn as
|
|
6346
|
+
Entity as Entity73,
|
|
6347
|
+
Column as Column74,
|
|
6348
|
+
ManyToOne as ManyToOne68,
|
|
6349
|
+
Index as Index66,
|
|
6350
|
+
JoinColumn as JoinColumn69
|
|
6305
6351
|
} from "typeorm";
|
|
6306
6352
|
var AssessmentRequestStatusEnum = /* @__PURE__ */ ((AssessmentRequestStatusEnum2) => {
|
|
6307
6353
|
AssessmentRequestStatusEnum2["PENDING"] = "PENDING";
|
|
@@ -6312,23 +6358,23 @@ var AssessmentRequestStatusEnum = /* @__PURE__ */ ((AssessmentRequestStatusEnum2
|
|
|
6312
6358
|
var FreelancerAssessmentRequest = class extends BaseEntity {
|
|
6313
6359
|
};
|
|
6314
6360
|
__decorateClass([
|
|
6315
|
-
|
|
6316
|
-
|
|
6361
|
+
Column74({ name: "freelancer_id", type: "integer", nullable: true }),
|
|
6362
|
+
Index66()
|
|
6317
6363
|
], FreelancerAssessmentRequest.prototype, "freelancerId", 2);
|
|
6318
6364
|
__decorateClass([
|
|
6319
|
-
|
|
6320
|
-
|
|
6365
|
+
ManyToOne68(() => User, (user) => user.freelancerAssessmentRequests),
|
|
6366
|
+
JoinColumn69({ name: "freelancer_id" })
|
|
6321
6367
|
], FreelancerAssessmentRequest.prototype, "freelancer", 2);
|
|
6322
6368
|
__decorateClass([
|
|
6323
|
-
|
|
6324
|
-
|
|
6369
|
+
Column74({ name: "approved_by_id", type: "integer", nullable: true }),
|
|
6370
|
+
Index66()
|
|
6325
6371
|
], FreelancerAssessmentRequest.prototype, "approvedById", 2);
|
|
6326
6372
|
__decorateClass([
|
|
6327
|
-
|
|
6328
|
-
|
|
6373
|
+
ManyToOne68(() => User, (user) => user.assessmentRequests),
|
|
6374
|
+
JoinColumn69({ name: "approved_by_id" })
|
|
6329
6375
|
], FreelancerAssessmentRequest.prototype, "approvedBy", 2);
|
|
6330
6376
|
__decorateClass([
|
|
6331
|
-
|
|
6377
|
+
Column74({
|
|
6332
6378
|
name: "status",
|
|
6333
6379
|
type: "enum",
|
|
6334
6380
|
enum: AssessmentRequestStatusEnum,
|
|
@@ -6336,89 +6382,89 @@ __decorateClass([
|
|
|
6336
6382
|
})
|
|
6337
6383
|
], FreelancerAssessmentRequest.prototype, "status", 2);
|
|
6338
6384
|
__decorateClass([
|
|
6339
|
-
|
|
6385
|
+
Column74({ name: "assessment_link", type: "text", nullable: true })
|
|
6340
6386
|
], FreelancerAssessmentRequest.prototype, "assessmentLink", 2);
|
|
6341
6387
|
FreelancerAssessmentRequest = __decorateClass([
|
|
6342
|
-
|
|
6388
|
+
Entity73({ name: "freelancer_assessment_requests" })
|
|
6343
6389
|
], FreelancerAssessmentRequest);
|
|
6344
6390
|
|
|
6345
6391
|
// src/entities/in-app-notification.entity.ts
|
|
6346
|
-
import { Entity as
|
|
6392
|
+
import { Entity as Entity74, Column as Column75, Index as Index67, ManyToOne as ManyToOne69, JoinColumn as JoinColumn70 } from "typeorm";
|
|
6347
6393
|
var InAppNotification = class extends BaseEntity {
|
|
6348
6394
|
};
|
|
6349
6395
|
__decorateClass([
|
|
6350
|
-
|
|
6351
|
-
|
|
6396
|
+
Column75({ name: "user_id", type: "integer", nullable: true }),
|
|
6397
|
+
Index67()
|
|
6352
6398
|
], InAppNotification.prototype, "userId", 2);
|
|
6353
6399
|
__decorateClass([
|
|
6354
|
-
|
|
6355
|
-
|
|
6400
|
+
ManyToOne69(() => User, (user) => user.inAppNotifications),
|
|
6401
|
+
JoinColumn70({ name: "user_id" })
|
|
6356
6402
|
], InAppNotification.prototype, "user", 2);
|
|
6357
6403
|
__decorateClass([
|
|
6358
|
-
|
|
6404
|
+
Column75({ name: "event", type: "varchar", nullable: true })
|
|
6359
6405
|
], InAppNotification.prototype, "event", 2);
|
|
6360
6406
|
__decorateClass([
|
|
6361
|
-
|
|
6407
|
+
Column75({ name: "title", type: "varchar", nullable: true })
|
|
6362
6408
|
], InAppNotification.prototype, "title", 2);
|
|
6363
6409
|
__decorateClass([
|
|
6364
|
-
|
|
6410
|
+
Column75({ name: "message", type: "varchar", nullable: true })
|
|
6365
6411
|
], InAppNotification.prototype, "message", 2);
|
|
6366
6412
|
__decorateClass([
|
|
6367
|
-
|
|
6413
|
+
Column75({ name: "redirect_url", type: "varchar", nullable: true })
|
|
6368
6414
|
], InAppNotification.prototype, "redirectUrl", 2);
|
|
6369
6415
|
__decorateClass([
|
|
6370
|
-
|
|
6416
|
+
Column75({ name: "is_read", type: "boolean", default: false })
|
|
6371
6417
|
], InAppNotification.prototype, "isRead", 2);
|
|
6372
6418
|
__decorateClass([
|
|
6373
|
-
|
|
6419
|
+
Column75({ name: "meta_data", type: "jsonb", nullable: true })
|
|
6374
6420
|
], InAppNotification.prototype, "metaData", 2);
|
|
6375
6421
|
InAppNotification = __decorateClass([
|
|
6376
|
-
|
|
6422
|
+
Entity74("in_app_notifications")
|
|
6377
6423
|
], InAppNotification);
|
|
6378
6424
|
|
|
6379
6425
|
// src/entities/user-subscription.entity.ts
|
|
6380
|
-
import { Entity as
|
|
6426
|
+
import { Entity as Entity78, Column as Column79, ManyToOne as ManyToOne73, OneToMany as OneToMany26, JoinColumn as JoinColumn74 } from "typeorm";
|
|
6381
6427
|
|
|
6382
6428
|
// src/entities/user-subscription-plan.entity.ts
|
|
6383
|
-
import { Entity as
|
|
6429
|
+
import { Entity as Entity77, Column as Column78, JoinColumn as JoinColumn73, ManyToOne as ManyToOne72, OneToMany as OneToMany25 } from "typeorm";
|
|
6384
6430
|
|
|
6385
6431
|
// src/entities/user-subscription-plan-feature.entity.ts
|
|
6386
|
-
import { Entity as
|
|
6432
|
+
import { Entity as Entity75, Column as Column76, ManyToOne as ManyToOne70, JoinColumn as JoinColumn71, Index as Index68 } from "typeorm";
|
|
6387
6433
|
var UserSubscriptionPlanFeature = class extends BaseEntity {
|
|
6388
6434
|
};
|
|
6389
6435
|
__decorateClass([
|
|
6390
|
-
|
|
6391
|
-
|
|
6436
|
+
Column76({ name: "user_subscription_plan_id", type: "integer", nullable: false }),
|
|
6437
|
+
Index68()
|
|
6392
6438
|
], UserSubscriptionPlanFeature.prototype, "userSubscriptionPlanId", 2);
|
|
6393
6439
|
__decorateClass([
|
|
6394
|
-
|
|
6395
|
-
|
|
6440
|
+
ManyToOne70(() => UserSubscriptionPlan, (plan) => plan.userSubscriptionPlanFeatures, { onDelete: "CASCADE", nullable: false }),
|
|
6441
|
+
JoinColumn71({ name: "user_subscription_plan_id" })
|
|
6396
6442
|
], UserSubscriptionPlanFeature.prototype, "userSubscriptionPlan", 2);
|
|
6397
6443
|
__decorateClass([
|
|
6398
|
-
|
|
6444
|
+
Column76({ name: "plan_feature_id", type: "integer", nullable: false })
|
|
6399
6445
|
], UserSubscriptionPlanFeature.prototype, "planFeatureId", 2);
|
|
6400
6446
|
__decorateClass([
|
|
6401
|
-
|
|
6447
|
+
Column76({ name: "name", type: "varchar", length: 200 })
|
|
6402
6448
|
], UserSubscriptionPlanFeature.prototype, "name", 2);
|
|
6403
6449
|
__decorateClass([
|
|
6404
|
-
|
|
6405
|
-
|
|
6450
|
+
Column76({ name: "slug", type: "varchar", length: 100 }),
|
|
6451
|
+
Index68()
|
|
6406
6452
|
], UserSubscriptionPlanFeature.prototype, "slug", 2);
|
|
6407
6453
|
__decorateClass([
|
|
6408
|
-
|
|
6454
|
+
Column76({ name: "tooltip", type: "varchar", length: 300, nullable: true })
|
|
6409
6455
|
], UserSubscriptionPlanFeature.prototype, "tooltip", 2);
|
|
6410
6456
|
__decorateClass([
|
|
6411
|
-
|
|
6457
|
+
Column76({ name: "sort_order", type: "smallint", default: 0 })
|
|
6412
6458
|
], UserSubscriptionPlanFeature.prototype, "sortOrder", 2);
|
|
6413
6459
|
__decorateClass([
|
|
6414
|
-
|
|
6460
|
+
Column76({ name: "is_active", type: "boolean", default: true })
|
|
6415
6461
|
], UserSubscriptionPlanFeature.prototype, "isActive", 2);
|
|
6416
6462
|
UserSubscriptionPlanFeature = __decorateClass([
|
|
6417
|
-
|
|
6463
|
+
Entity75("user_subscription_plan_features")
|
|
6418
6464
|
], UserSubscriptionPlanFeature);
|
|
6419
6465
|
|
|
6420
6466
|
// src/entities/user-subscription-plan-pricing.entity.ts
|
|
6421
|
-
import { Entity as
|
|
6467
|
+
import { Entity as Entity76, Column as Column77, ManyToOne as ManyToOne71, JoinColumn as JoinColumn72, Index as Index69 } from "typeorm";
|
|
6422
6468
|
var UserSubscriptionPlanPricingBillingCycleEnum = /* @__PURE__ */ ((UserSubscriptionPlanPricingBillingCycleEnum2) => {
|
|
6423
6469
|
UserSubscriptionPlanPricingBillingCycleEnum2["MONTHLY"] = "MONTHLY";
|
|
6424
6470
|
UserSubscriptionPlanPricingBillingCycleEnum2["YEARLY"] = "YEARLY";
|
|
@@ -6427,42 +6473,42 @@ var UserSubscriptionPlanPricingBillingCycleEnum = /* @__PURE__ */ ((UserSubscrip
|
|
|
6427
6473
|
var UserSubscriptionPlanPricing = class extends BaseEntity {
|
|
6428
6474
|
};
|
|
6429
6475
|
__decorateClass([
|
|
6430
|
-
|
|
6431
|
-
|
|
6476
|
+
Column77({ name: "user_subscription_plan_id", type: "integer", nullable: false }),
|
|
6477
|
+
Index69()
|
|
6432
6478
|
], UserSubscriptionPlanPricing.prototype, "userSubscriptionPlanId", 2);
|
|
6433
6479
|
__decorateClass([
|
|
6434
|
-
|
|
6435
|
-
|
|
6480
|
+
ManyToOne71(() => UserSubscriptionPlan, (plan) => plan.userSubscriptionPlanPricing, { onDelete: "CASCADE", nullable: false }),
|
|
6481
|
+
JoinColumn72({ name: "user_subscription_plan_id" })
|
|
6436
6482
|
], UserSubscriptionPlanPricing.prototype, "userSubscriptionPlan", 2);
|
|
6437
6483
|
__decorateClass([
|
|
6438
|
-
|
|
6484
|
+
Column77({ name: "plan_pricing_id", type: "integer", nullable: false })
|
|
6439
6485
|
], UserSubscriptionPlanPricing.prototype, "planPricingId", 2);
|
|
6440
6486
|
__decorateClass([
|
|
6441
|
-
|
|
6487
|
+
Column77({ name: "billing_cycle", type: "enum", enum: UserSubscriptionPlanPricingBillingCycleEnum })
|
|
6442
6488
|
], UserSubscriptionPlanPricing.prototype, "billingCycle", 2);
|
|
6443
6489
|
__decorateClass([
|
|
6444
|
-
|
|
6490
|
+
Column77({ name: "price", type: "decimal", precision: 10, scale: 2, default: 0 })
|
|
6445
6491
|
], UserSubscriptionPlanPricing.prototype, "price", 2);
|
|
6446
6492
|
__decorateClass([
|
|
6447
|
-
|
|
6493
|
+
Column77({ name: "original_price", type: "decimal", precision: 10, scale: 2, nullable: true })
|
|
6448
6494
|
], UserSubscriptionPlanPricing.prototype, "originalPrice", 2);
|
|
6449
6495
|
__decorateClass([
|
|
6450
|
-
|
|
6496
|
+
Column77({ name: "discount_pct", type: "decimal", precision: 5, scale: 2, nullable: true })
|
|
6451
6497
|
], UserSubscriptionPlanPricing.prototype, "discountPct", 2);
|
|
6452
6498
|
__decorateClass([
|
|
6453
|
-
|
|
6499
|
+
Column77({ name: "currency", type: "varchar", length: 3, default: "USD" })
|
|
6454
6500
|
], UserSubscriptionPlanPricing.prototype, "currency", 2);
|
|
6455
6501
|
__decorateClass([
|
|
6456
|
-
|
|
6502
|
+
Column77({ name: "is_free", type: "boolean", default: false })
|
|
6457
6503
|
], UserSubscriptionPlanPricing.prototype, "isFree", 2);
|
|
6458
6504
|
__decorateClass([
|
|
6459
|
-
|
|
6505
|
+
Column77({ name: "stripe_price_id", type: "varchar", length: 100, nullable: true })
|
|
6460
6506
|
], UserSubscriptionPlanPricing.prototype, "stripePriceId", 2);
|
|
6461
6507
|
__decorateClass([
|
|
6462
|
-
|
|
6508
|
+
Column77({ name: "is_active", type: "boolean", default: true })
|
|
6463
6509
|
], UserSubscriptionPlanPricing.prototype, "isActive", 2);
|
|
6464
6510
|
UserSubscriptionPlanPricing = __decorateClass([
|
|
6465
|
-
|
|
6511
|
+
Entity76("user_subscription_plan_pricings")
|
|
6466
6512
|
], UserSubscriptionPlanPricing);
|
|
6467
6513
|
|
|
6468
6514
|
// src/entities/user-subscription-plan.entity.ts
|
|
@@ -6474,35 +6520,35 @@ var UserSubscriptionPlanTypeEnum = /* @__PURE__ */ ((UserSubscriptionPlanTypeEnu
|
|
|
6474
6520
|
var UserSubscriptionPlan = class extends BaseEntity {
|
|
6475
6521
|
};
|
|
6476
6522
|
__decorateClass([
|
|
6477
|
-
|
|
6523
|
+
Column78({ name: "user_subscription_id", type: "integer", nullable: false })
|
|
6478
6524
|
], UserSubscriptionPlan.prototype, "userSubscriptionId", 2);
|
|
6479
6525
|
__decorateClass([
|
|
6480
|
-
|
|
6481
|
-
|
|
6526
|
+
ManyToOne72(() => UserSubscription, (userSubscription) => userSubscription.userSubscriptionPlans, { onDelete: "CASCADE", nullable: false }),
|
|
6527
|
+
JoinColumn73({ name: "user_subscription_id" })
|
|
6482
6528
|
], UserSubscriptionPlan.prototype, "userSubscription", 2);
|
|
6483
6529
|
__decorateClass([
|
|
6484
|
-
|
|
6530
|
+
Column78({ name: "plan_id", type: "integer", nullable: false })
|
|
6485
6531
|
], UserSubscriptionPlan.prototype, "planId", 2);
|
|
6486
6532
|
__decorateClass([
|
|
6487
|
-
|
|
6533
|
+
Column78({ name: "name", type: "varchar", length: 100 })
|
|
6488
6534
|
], UserSubscriptionPlan.prototype, "name", 2);
|
|
6489
6535
|
__decorateClass([
|
|
6490
|
-
|
|
6536
|
+
Column78({ name: "slug", type: "varchar", length: 100 })
|
|
6491
6537
|
], UserSubscriptionPlan.prototype, "slug", 2);
|
|
6492
6538
|
__decorateClass([
|
|
6493
|
-
|
|
6539
|
+
Column78({ name: "badge_label", type: "varchar", length: 60, nullable: true })
|
|
6494
6540
|
], UserSubscriptionPlan.prototype, "badgeLabel", 2);
|
|
6495
6541
|
__decorateClass([
|
|
6496
|
-
|
|
6542
|
+
Column78({ name: "sort_order", type: "smallint", default: 0 })
|
|
6497
6543
|
], UserSubscriptionPlan.prototype, "sortOrder", 2);
|
|
6498
6544
|
__decorateClass([
|
|
6499
|
-
|
|
6545
|
+
Column78({ name: "is_active", type: "boolean", default: true })
|
|
6500
6546
|
], UserSubscriptionPlan.prototype, "isActive", 2);
|
|
6501
6547
|
__decorateClass([
|
|
6502
|
-
|
|
6548
|
+
Column78({ name: "plan_type", type: "enum", enum: UserSubscriptionPlanTypeEnum, default: "BUSINESS" /* BUSINESS */ })
|
|
6503
6549
|
], UserSubscriptionPlan.prototype, "planType", 2);
|
|
6504
6550
|
__decorateClass([
|
|
6505
|
-
|
|
6551
|
+
Column78({ name: "metadata", type: "jsonb", default: {} })
|
|
6506
6552
|
], UserSubscriptionPlan.prototype, "metadata", 2);
|
|
6507
6553
|
__decorateClass([
|
|
6508
6554
|
OneToMany25(() => UserSubscriptionPlanFeature, (f) => f.userSubscriptionPlan)
|
|
@@ -6511,7 +6557,7 @@ __decorateClass([
|
|
|
6511
6557
|
OneToMany25(() => UserSubscriptionPlanPricing, (p) => p.userSubscriptionPlan)
|
|
6512
6558
|
], UserSubscriptionPlan.prototype, "userSubscriptionPlanPricing", 2);
|
|
6513
6559
|
UserSubscriptionPlan = __decorateClass([
|
|
6514
|
-
|
|
6560
|
+
Entity77("user_subscription_plans")
|
|
6515
6561
|
], UserSubscriptionPlan);
|
|
6516
6562
|
|
|
6517
6563
|
// src/entities/user-subscription.entity.ts
|
|
@@ -6529,26 +6575,26 @@ var UserSubscriptionStatusEnum = /* @__PURE__ */ ((UserSubscriptionStatusEnum2)
|
|
|
6529
6575
|
var UserSubscription = class extends BaseEntity {
|
|
6530
6576
|
};
|
|
6531
6577
|
__decorateClass([
|
|
6532
|
-
|
|
6578
|
+
Column79({ name: "user_id", type: "integer", nullable: false })
|
|
6533
6579
|
], UserSubscription.prototype, "userId", 2);
|
|
6534
6580
|
__decorateClass([
|
|
6535
|
-
|
|
6536
|
-
|
|
6581
|
+
ManyToOne73(() => User, (user) => user.userSubscriptions, { onDelete: "CASCADE", nullable: false }),
|
|
6582
|
+
JoinColumn74({ name: "user_id" })
|
|
6537
6583
|
], UserSubscription.prototype, "user", 2);
|
|
6538
6584
|
__decorateClass([
|
|
6539
6585
|
OneToMany26(() => UserSubscriptionPlan, (plan) => plan.userSubscription)
|
|
6540
6586
|
], UserSubscription.prototype, "userSubscriptionPlans", 2);
|
|
6541
6587
|
__decorateClass([
|
|
6542
|
-
|
|
6588
|
+
Column79({ name: "subscription_amount", type: "integer", nullable: false })
|
|
6543
6589
|
], UserSubscription.prototype, "subscriptionAmount", 2);
|
|
6544
6590
|
__decorateClass([
|
|
6545
|
-
|
|
6591
|
+
Column79({ name: "total_tax_amount", type: "integer", nullable: false })
|
|
6546
6592
|
], UserSubscription.prototype, "totalTaxAmount", 2);
|
|
6547
6593
|
__decorateClass([
|
|
6548
|
-
|
|
6594
|
+
Column79({ name: "total_amount", type: "integer", nullable: false })
|
|
6549
6595
|
], UserSubscription.prototype, "totalAmount", 2);
|
|
6550
6596
|
__decorateClass([
|
|
6551
|
-
|
|
6597
|
+
Column79({
|
|
6552
6598
|
name: "status",
|
|
6553
6599
|
type: "enum",
|
|
6554
6600
|
enum: UserSubscriptionStatusEnum,
|
|
@@ -6556,35 +6602,35 @@ __decorateClass([
|
|
|
6556
6602
|
})
|
|
6557
6603
|
], UserSubscription.prototype, "status", 2);
|
|
6558
6604
|
__decorateClass([
|
|
6559
|
-
|
|
6605
|
+
Column79({
|
|
6560
6606
|
name: "subscription_start_date",
|
|
6561
6607
|
type: "timestamptz",
|
|
6562
6608
|
nullable: true
|
|
6563
6609
|
})
|
|
6564
6610
|
], UserSubscription.prototype, "subscriptionStartDate", 2);
|
|
6565
6611
|
__decorateClass([
|
|
6566
|
-
|
|
6612
|
+
Column79({
|
|
6567
6613
|
name: "subscription_start_date_timestamp",
|
|
6568
6614
|
type: "integer",
|
|
6569
6615
|
nullable: true
|
|
6570
6616
|
})
|
|
6571
6617
|
], UserSubscription.prototype, "subscriptionStartDateTimestamp", 2);
|
|
6572
6618
|
__decorateClass([
|
|
6573
|
-
|
|
6619
|
+
Column79({
|
|
6574
6620
|
name: "subscription_end_date",
|
|
6575
6621
|
type: "timestamptz",
|
|
6576
6622
|
nullable: true
|
|
6577
6623
|
})
|
|
6578
6624
|
], UserSubscription.prototype, "subscriptionEndDate", 2);
|
|
6579
6625
|
__decorateClass([
|
|
6580
|
-
|
|
6626
|
+
Column79({
|
|
6581
6627
|
name: "subscription_end_date_timestamp",
|
|
6582
6628
|
type: "integer",
|
|
6583
6629
|
nullable: true
|
|
6584
6630
|
})
|
|
6585
6631
|
], UserSubscription.prototype, "subscriptionEndDateTimestamp", 2);
|
|
6586
6632
|
__decorateClass([
|
|
6587
|
-
|
|
6633
|
+
Column79({
|
|
6588
6634
|
name: "stripe_price_id",
|
|
6589
6635
|
type: "varchar",
|
|
6590
6636
|
length: 100,
|
|
@@ -6592,7 +6638,7 @@ __decorateClass([
|
|
|
6592
6638
|
})
|
|
6593
6639
|
], UserSubscription.prototype, "stripePriceId", 2);
|
|
6594
6640
|
__decorateClass([
|
|
6595
|
-
|
|
6641
|
+
Column79({
|
|
6596
6642
|
name: "stripe_product_id",
|
|
6597
6643
|
type: "varchar",
|
|
6598
6644
|
length: 100,
|
|
@@ -6600,7 +6646,7 @@ __decorateClass([
|
|
|
6600
6646
|
})
|
|
6601
6647
|
], UserSubscription.prototype, "stripeProductId", 2);
|
|
6602
6648
|
__decorateClass([
|
|
6603
|
-
|
|
6649
|
+
Column79({
|
|
6604
6650
|
name: "stripe_customer_id",
|
|
6605
6651
|
type: "varchar",
|
|
6606
6652
|
length: 64,
|
|
@@ -6608,7 +6654,7 @@ __decorateClass([
|
|
|
6608
6654
|
})
|
|
6609
6655
|
], UserSubscription.prototype, "stripeCustomerId", 2);
|
|
6610
6656
|
__decorateClass([
|
|
6611
|
-
|
|
6657
|
+
Column79({
|
|
6612
6658
|
name: "stripe_subscription_id",
|
|
6613
6659
|
type: "varchar",
|
|
6614
6660
|
length: 64,
|
|
@@ -6617,7 +6663,7 @@ __decorateClass([
|
|
|
6617
6663
|
})
|
|
6618
6664
|
], UserSubscription.prototype, "stripeSubscriptionId", 2);
|
|
6619
6665
|
__decorateClass([
|
|
6620
|
-
|
|
6666
|
+
Column79({
|
|
6621
6667
|
name: "stripe_checkout_session_id",
|
|
6622
6668
|
type: "varchar",
|
|
6623
6669
|
length: 255,
|
|
@@ -6625,7 +6671,7 @@ __decorateClass([
|
|
|
6625
6671
|
})
|
|
6626
6672
|
], UserSubscription.prototype, "stripeCheckoutSessionId", 2);
|
|
6627
6673
|
UserSubscription = __decorateClass([
|
|
6628
|
-
|
|
6674
|
+
Entity78("user_subscriptions")
|
|
6629
6675
|
], UserSubscription);
|
|
6630
6676
|
|
|
6631
6677
|
// src/entities/user.entity.ts
|
|
@@ -6654,57 +6700,57 @@ var Provider = /* @__PURE__ */ ((Provider2) => {
|
|
|
6654
6700
|
var User = class extends BaseEntity {
|
|
6655
6701
|
};
|
|
6656
6702
|
__decorateClass([
|
|
6657
|
-
|
|
6703
|
+
Column80({ name: "unique_id", type: "varchar", unique: true })
|
|
6658
6704
|
], User.prototype, "uniqueId", 2);
|
|
6659
6705
|
__decorateClass([
|
|
6660
|
-
|
|
6661
|
-
|
|
6706
|
+
Column80({ name: "parent_id", type: "integer", nullable: true }),
|
|
6707
|
+
Index70()
|
|
6662
6708
|
], User.prototype, "parentId", 2);
|
|
6663
6709
|
__decorateClass([
|
|
6664
|
-
|
|
6665
|
-
|
|
6710
|
+
ManyToOne74(() => User, (user) => user.children, { nullable: true }),
|
|
6711
|
+
JoinColumn75({ name: "parent_id" })
|
|
6666
6712
|
], User.prototype, "parent", 2);
|
|
6667
6713
|
__decorateClass([
|
|
6668
6714
|
OneToMany27(() => User, (user) => user.parent)
|
|
6669
6715
|
], User.prototype, "children", 2);
|
|
6670
6716
|
__decorateClass([
|
|
6671
|
-
|
|
6717
|
+
Column80({ name: "username", type: "varchar", unique: true, nullable: true })
|
|
6672
6718
|
], User.prototype, "username", 2);
|
|
6673
6719
|
__decorateClass([
|
|
6674
|
-
|
|
6720
|
+
Column80({ name: "first_name", type: "varchar", length: 100, nullable: true })
|
|
6675
6721
|
], User.prototype, "firstName", 2);
|
|
6676
6722
|
__decorateClass([
|
|
6677
|
-
|
|
6723
|
+
Column80({ name: "last_name", type: "varchar", length: 100, nullable: true })
|
|
6678
6724
|
], User.prototype, "lastName", 2);
|
|
6679
6725
|
__decorateClass([
|
|
6680
|
-
|
|
6726
|
+
Column80({ name: "date_of_birth", type: "date", nullable: true })
|
|
6681
6727
|
], User.prototype, "dateOfBirth", 2);
|
|
6682
6728
|
__decorateClass([
|
|
6683
|
-
|
|
6729
|
+
Column80({ name: "gender", type: "varchar", length: 10, nullable: true })
|
|
6684
6730
|
], User.prototype, "gender", 2);
|
|
6685
6731
|
__decorateClass([
|
|
6686
|
-
|
|
6732
|
+
Column80({ name: "profile_picture_url", type: "text", nullable: true })
|
|
6687
6733
|
], User.prototype, "profilePictureUrl", 2);
|
|
6688
6734
|
__decorateClass([
|
|
6689
|
-
|
|
6735
|
+
Column80({ name: "presigned_profile_picture_url", type: "text", nullable: true })
|
|
6690
6736
|
], User.prototype, "presignedProfilePictureUrl", 2);
|
|
6691
6737
|
__decorateClass([
|
|
6692
|
-
|
|
6738
|
+
Column80({ name: "presigned_profile_picture_url_expires_at", type: "timestamp with time zone", nullable: true })
|
|
6693
6739
|
], User.prototype, "presignedProfilePictureUrlExpiresAt", 2);
|
|
6694
6740
|
__decorateClass([
|
|
6695
|
-
|
|
6741
|
+
Column80({ name: "email", type: "varchar", unique: true })
|
|
6696
6742
|
], User.prototype, "email", 2);
|
|
6697
6743
|
__decorateClass([
|
|
6698
|
-
|
|
6744
|
+
Column80({ name: "mobile_code", type: "varchar", nullable: true })
|
|
6699
6745
|
], User.prototype, "mobileCode", 2);
|
|
6700
6746
|
__decorateClass([
|
|
6701
|
-
|
|
6747
|
+
Column80({ name: "mobile", type: "varchar", nullable: true })
|
|
6702
6748
|
], User.prototype, "mobile", 2);
|
|
6703
6749
|
__decorateClass([
|
|
6704
|
-
|
|
6750
|
+
Column80({ name: "password", type: "varchar", nullable: true })
|
|
6705
6751
|
], User.prototype, "password", 2);
|
|
6706
6752
|
__decorateClass([
|
|
6707
|
-
|
|
6753
|
+
Column80({
|
|
6708
6754
|
name: "account_type",
|
|
6709
6755
|
type: "enum",
|
|
6710
6756
|
enum: AccountType2,
|
|
@@ -6712,7 +6758,7 @@ __decorateClass([
|
|
|
6712
6758
|
})
|
|
6713
6759
|
], User.prototype, "accountType", 2);
|
|
6714
6760
|
__decorateClass([
|
|
6715
|
-
|
|
6761
|
+
Column80({
|
|
6716
6762
|
name: "account_status",
|
|
6717
6763
|
type: "enum",
|
|
6718
6764
|
enum: AccountStatus,
|
|
@@ -6720,45 +6766,45 @@ __decorateClass([
|
|
|
6720
6766
|
})
|
|
6721
6767
|
], User.prototype, "accountStatus", 2);
|
|
6722
6768
|
__decorateClass([
|
|
6723
|
-
|
|
6769
|
+
Column80({ name: "is_email_verified", type: "boolean", default: false })
|
|
6724
6770
|
], User.prototype, "isEmailVerified", 2);
|
|
6725
6771
|
__decorateClass([
|
|
6726
|
-
|
|
6772
|
+
Column80({ name: "is_mobile_verified", type: "boolean", default: false })
|
|
6727
6773
|
], User.prototype, "isMobileVerified", 2);
|
|
6728
6774
|
__decorateClass([
|
|
6729
|
-
|
|
6775
|
+
Column80({ name: "is_social", type: "boolean", default: false })
|
|
6730
6776
|
], User.prototype, "isSocial", 2);
|
|
6731
6777
|
__decorateClass([
|
|
6732
|
-
|
|
6778
|
+
Column80({ name: "is_referral_user", type: "boolean", default: false })
|
|
6733
6779
|
], User.prototype, "isReferralUser", 2);
|
|
6734
6780
|
__decorateClass([
|
|
6735
|
-
|
|
6781
|
+
Column80({
|
|
6736
6782
|
name: "last_login_at",
|
|
6737
6783
|
type: "timestamp with time zone",
|
|
6738
6784
|
nullable: true
|
|
6739
6785
|
})
|
|
6740
6786
|
], User.prototype, "lastLoginAt", 2);
|
|
6741
6787
|
__decorateClass([
|
|
6742
|
-
|
|
6788
|
+
Column80({ name: "last_login_ip", type: "varchar", nullable: true })
|
|
6743
6789
|
], User.prototype, "lastLoginIp", 2);
|
|
6744
6790
|
__decorateClass([
|
|
6745
|
-
|
|
6791
|
+
Column80({ name: "reset_token", type: "varchar", nullable: true })
|
|
6746
6792
|
], User.prototype, "resetToken", 2);
|
|
6747
6793
|
__decorateClass([
|
|
6748
|
-
|
|
6794
|
+
Column80({
|
|
6749
6795
|
name: "reset_token_expire_at",
|
|
6750
6796
|
type: "timestamp with time zone",
|
|
6751
6797
|
nullable: true
|
|
6752
6798
|
})
|
|
6753
6799
|
], User.prototype, "resetTokenExpireAt", 2);
|
|
6754
6800
|
__decorateClass([
|
|
6755
|
-
|
|
6801
|
+
Column80({ name: "set_password_token", type: "varchar", nullable: true })
|
|
6756
6802
|
], User.prototype, "setPasswordToken", 2);
|
|
6757
6803
|
__decorateClass([
|
|
6758
6804
|
OneToMany27(() => RefreshToken, (token) => token.user)
|
|
6759
6805
|
], User.prototype, "refreshTokens", 2);
|
|
6760
6806
|
__decorateClass([
|
|
6761
|
-
|
|
6807
|
+
Column80({
|
|
6762
6808
|
name: "provider",
|
|
6763
6809
|
type: "enum",
|
|
6764
6810
|
enum: Provider,
|
|
@@ -6767,22 +6813,22 @@ __decorateClass([
|
|
|
6767
6813
|
})
|
|
6768
6814
|
], User.prototype, "provider", 2);
|
|
6769
6815
|
__decorateClass([
|
|
6770
|
-
|
|
6816
|
+
Column80({ name: "provider_token", type: "varchar", nullable: true })
|
|
6771
6817
|
], User.prototype, "providerToken", 2);
|
|
6772
6818
|
__decorateClass([
|
|
6773
|
-
|
|
6819
|
+
Column80({ name: "linkedin_id", type: "varchar", nullable: true })
|
|
6774
6820
|
], User.prototype, "linkedInId", 2);
|
|
6775
6821
|
__decorateClass([
|
|
6776
|
-
|
|
6822
|
+
Column80({ name: "google_id", type: "varchar", nullable: true })
|
|
6777
6823
|
], User.prototype, "googleId", 2);
|
|
6778
6824
|
__decorateClass([
|
|
6779
|
-
|
|
6825
|
+
Column80({ name: "gitlabs_id", type: "varchar", nullable: true })
|
|
6780
6826
|
], User.prototype, "gitLabsId", 2);
|
|
6781
6827
|
__decorateClass([
|
|
6782
|
-
|
|
6828
|
+
Column80({ name: "onboarded_by", type: "varchar", nullable: true })
|
|
6783
6829
|
], User.prototype, "onBoardedBy", 2);
|
|
6784
6830
|
__decorateClass([
|
|
6785
|
-
|
|
6831
|
+
Column80({ name: "ip", type: "varchar", nullable: true })
|
|
6786
6832
|
], User.prototype, "ip", 2);
|
|
6787
6833
|
__decorateClass([
|
|
6788
6834
|
OneToMany27(() => Otp, (otp) => otp.user)
|
|
@@ -6802,6 +6848,9 @@ __decorateClass([
|
|
|
6802
6848
|
(companyMemberRole) => companyMemberRole.user
|
|
6803
6849
|
)
|
|
6804
6850
|
], User.prototype, "companyMemberRoles", 2);
|
|
6851
|
+
__decorateClass([
|
|
6852
|
+
OneToOne12(() => CompanyMember, (companyMember) => companyMember.user)
|
|
6853
|
+
], User.prototype, "companyMember", 2);
|
|
6805
6854
|
__decorateClass([
|
|
6806
6855
|
OneToMany27(() => AiInterview, (aiInterview) => aiInterview.interviwer)
|
|
6807
6856
|
], User.prototype, "companyAiInterview", 2);
|
|
@@ -7032,7 +7081,7 @@ __decorateClass([
|
|
|
7032
7081
|
OneToMany27(() => UserSubscription, (userSubscription) => userSubscription.user)
|
|
7033
7082
|
], User.prototype, "userSubscriptions", 2);
|
|
7034
7083
|
User = __decorateClass([
|
|
7035
|
-
|
|
7084
|
+
Entity79("users")
|
|
7036
7085
|
], User);
|
|
7037
7086
|
|
|
7038
7087
|
// src/modules/user/subadmin/dto/update-subadmin-account-status.dto.ts
|
|
@@ -14506,11 +14555,11 @@ var ChatRMQAdapter = (mode = "microservice") => {
|
|
|
14506
14555
|
};
|
|
14507
14556
|
|
|
14508
14557
|
// src/entities/sequence-generator.entity.ts
|
|
14509
|
-
import { Entity as
|
|
14558
|
+
import { Entity as Entity80, Column as Column81 } from "typeorm";
|
|
14510
14559
|
var SequenceGenerator = class extends BaseEntity {
|
|
14511
14560
|
};
|
|
14512
14561
|
__decorateClass([
|
|
14513
|
-
|
|
14562
|
+
Column81({
|
|
14514
14563
|
name: "module",
|
|
14515
14564
|
type: "varchar",
|
|
14516
14565
|
length: 50,
|
|
@@ -14519,7 +14568,7 @@ __decorateClass([
|
|
|
14519
14568
|
})
|
|
14520
14569
|
], SequenceGenerator.prototype, "module", 2);
|
|
14521
14570
|
__decorateClass([
|
|
14522
|
-
|
|
14571
|
+
Column81({
|
|
14523
14572
|
name: "prefix",
|
|
14524
14573
|
type: "varchar",
|
|
14525
14574
|
length: 10,
|
|
@@ -14528,7 +14577,7 @@ __decorateClass([
|
|
|
14528
14577
|
})
|
|
14529
14578
|
], SequenceGenerator.prototype, "prefix", 2);
|
|
14530
14579
|
__decorateClass([
|
|
14531
|
-
|
|
14580
|
+
Column81({
|
|
14532
14581
|
name: "last_sequence",
|
|
14533
14582
|
type: "int",
|
|
14534
14583
|
nullable: false,
|
|
@@ -14536,7 +14585,7 @@ __decorateClass([
|
|
|
14536
14585
|
})
|
|
14537
14586
|
], SequenceGenerator.prototype, "lastSequence", 2);
|
|
14538
14587
|
__decorateClass([
|
|
14539
|
-
|
|
14588
|
+
Column81({
|
|
14540
14589
|
name: "year",
|
|
14541
14590
|
type: "int",
|
|
14542
14591
|
nullable: true,
|
|
@@ -14544,11 +14593,11 @@ __decorateClass([
|
|
|
14544
14593
|
})
|
|
14545
14594
|
], SequenceGenerator.prototype, "year", 2);
|
|
14546
14595
|
SequenceGenerator = __decorateClass([
|
|
14547
|
-
|
|
14596
|
+
Entity80("sequence_generators")
|
|
14548
14597
|
], SequenceGenerator);
|
|
14549
14598
|
|
|
14550
14599
|
// src/entities/question.entity.ts
|
|
14551
|
-
import { Entity as
|
|
14600
|
+
import { Entity as Entity81, Column as Column82 } from "typeorm";
|
|
14552
14601
|
var QuestionFor = /* @__PURE__ */ ((QuestionFor2) => {
|
|
14553
14602
|
QuestionFor2["CLIENT"] = "CLIENT";
|
|
14554
14603
|
QuestionFor2["FREELANCER"] = "FREELANCER";
|
|
@@ -14557,16 +14606,16 @@ var QuestionFor = /* @__PURE__ */ ((QuestionFor2) => {
|
|
|
14557
14606
|
var Question = class extends BaseEntity {
|
|
14558
14607
|
};
|
|
14559
14608
|
__decorateClass([
|
|
14560
|
-
|
|
14609
|
+
Column82({ name: "question", type: "varchar" })
|
|
14561
14610
|
], Question.prototype, "question", 2);
|
|
14562
14611
|
__decorateClass([
|
|
14563
|
-
|
|
14612
|
+
Column82({ name: "hint", type: "varchar", nullable: true })
|
|
14564
14613
|
], Question.prototype, "hint", 2);
|
|
14565
14614
|
__decorateClass([
|
|
14566
|
-
|
|
14615
|
+
Column82({ name: "slug", type: "varchar", nullable: true, unique: true })
|
|
14567
14616
|
], Question.prototype, "slug", 2);
|
|
14568
14617
|
__decorateClass([
|
|
14569
|
-
|
|
14618
|
+
Column82({
|
|
14570
14619
|
name: "question_for",
|
|
14571
14620
|
type: "enum",
|
|
14572
14621
|
enum: QuestionFor,
|
|
@@ -14574,49 +14623,49 @@ __decorateClass([
|
|
|
14574
14623
|
})
|
|
14575
14624
|
], Question.prototype, "questionFor", 2);
|
|
14576
14625
|
__decorateClass([
|
|
14577
|
-
|
|
14626
|
+
Column82({ name: "type", type: "varchar", nullable: true })
|
|
14578
14627
|
], Question.prototype, "type", 2);
|
|
14579
14628
|
__decorateClass([
|
|
14580
|
-
|
|
14629
|
+
Column82({ name: "options", type: "jsonb", nullable: true })
|
|
14581
14630
|
], Question.prototype, "options", 2);
|
|
14582
14631
|
__decorateClass([
|
|
14583
|
-
|
|
14632
|
+
Column82({ name: "is_active", type: "boolean", default: false })
|
|
14584
14633
|
], Question.prototype, "isActive", 2);
|
|
14585
14634
|
Question = __decorateClass([
|
|
14586
|
-
|
|
14635
|
+
Entity81("questions")
|
|
14587
14636
|
], Question);
|
|
14588
14637
|
|
|
14589
14638
|
// src/entities/skill.entity.ts
|
|
14590
|
-
import { Entity as
|
|
14639
|
+
import { Entity as Entity82, Column as Column83 } from "typeorm";
|
|
14591
14640
|
var Skill = class extends BaseEntity {
|
|
14592
14641
|
};
|
|
14593
14642
|
__decorateClass([
|
|
14594
|
-
|
|
14643
|
+
Column83({ name: "name", type: "varchar", nullable: true })
|
|
14595
14644
|
], Skill.prototype, "name", 2);
|
|
14596
14645
|
__decorateClass([
|
|
14597
|
-
|
|
14646
|
+
Column83({ name: "slug", type: "varchar", nullable: true, unique: true })
|
|
14598
14647
|
], Skill.prototype, "slug", 2);
|
|
14599
14648
|
__decorateClass([
|
|
14600
|
-
|
|
14649
|
+
Column83({ name: "is_active", type: "boolean", default: false })
|
|
14601
14650
|
], Skill.prototype, "isActive", 2);
|
|
14602
14651
|
Skill = __decorateClass([
|
|
14603
|
-
|
|
14652
|
+
Entity82("skills")
|
|
14604
14653
|
], Skill);
|
|
14605
14654
|
|
|
14606
14655
|
// src/entities/skill-catalog.entity.ts
|
|
14607
14656
|
import {
|
|
14608
|
-
Entity as
|
|
14609
|
-
Column as
|
|
14610
|
-
Index as
|
|
14657
|
+
Entity as Entity83,
|
|
14658
|
+
Column as Column84,
|
|
14659
|
+
Index as Index71
|
|
14611
14660
|
} from "typeorm";
|
|
14612
14661
|
var SkillCatalog = class extends BaseEntity {
|
|
14613
14662
|
};
|
|
14614
14663
|
__decorateClass([
|
|
14615
|
-
|
|
14616
|
-
|
|
14664
|
+
Column84({ name: "canonical_name", type: "varchar", length: 100, unique: true }),
|
|
14665
|
+
Index71()
|
|
14617
14666
|
], SkillCatalog.prototype, "canonicalName", 2);
|
|
14618
14667
|
__decorateClass([
|
|
14619
|
-
|
|
14668
|
+
Column84({
|
|
14620
14669
|
name: "aliases",
|
|
14621
14670
|
type: "text",
|
|
14622
14671
|
array: true,
|
|
@@ -14624,20 +14673,20 @@ __decorateClass([
|
|
|
14624
14673
|
})
|
|
14625
14674
|
], SkillCatalog.prototype, "aliases", 2);
|
|
14626
14675
|
__decorateClass([
|
|
14627
|
-
|
|
14676
|
+
Column84({
|
|
14628
14677
|
name: "variations",
|
|
14629
14678
|
type: "jsonb",
|
|
14630
14679
|
default: "{}"
|
|
14631
14680
|
})
|
|
14632
14681
|
], SkillCatalog.prototype, "variations", 2);
|
|
14633
14682
|
__decorateClass([
|
|
14634
|
-
|
|
14683
|
+
Column84({ name: "category", type: "varchar", length: 50, nullable: true })
|
|
14635
14684
|
], SkillCatalog.prototype, "category", 2);
|
|
14636
14685
|
__decorateClass([
|
|
14637
|
-
|
|
14686
|
+
Column84({ name: "parent_skill", type: "varchar", length: 100, nullable: true })
|
|
14638
14687
|
], SkillCatalog.prototype, "parentSkill", 2);
|
|
14639
14688
|
__decorateClass([
|
|
14640
|
-
|
|
14689
|
+
Column84({
|
|
14641
14690
|
name: "related_skills",
|
|
14642
14691
|
type: "text",
|
|
14643
14692
|
array: true,
|
|
@@ -14645,70 +14694,70 @@ __decorateClass([
|
|
|
14645
14694
|
})
|
|
14646
14695
|
], SkillCatalog.prototype, "relatedSkills", 2);
|
|
14647
14696
|
__decorateClass([
|
|
14648
|
-
|
|
14649
|
-
|
|
14697
|
+
Column84({ name: "usage_count", type: "integer", default: 0 }),
|
|
14698
|
+
Index71()
|
|
14650
14699
|
], SkillCatalog.prototype, "usageCount", 2);
|
|
14651
14700
|
__decorateClass([
|
|
14652
|
-
|
|
14701
|
+
Column84({ name: "is_verified", type: "boolean", default: false })
|
|
14653
14702
|
], SkillCatalog.prototype, "isVerified", 2);
|
|
14654
14703
|
__decorateClass([
|
|
14655
|
-
|
|
14704
|
+
Column84({ name: "first_seen_date", type: "date" })
|
|
14656
14705
|
], SkillCatalog.prototype, "firstSeenDate", 2);
|
|
14657
14706
|
__decorateClass([
|
|
14658
|
-
|
|
14707
|
+
Column84({ name: "last_updated_date", type: "date" })
|
|
14659
14708
|
], SkillCatalog.prototype, "lastUpdatedDate", 2);
|
|
14660
14709
|
__decorateClass([
|
|
14661
|
-
|
|
14710
|
+
Column84({
|
|
14662
14711
|
name: "search_vector",
|
|
14663
14712
|
type: "tsvector",
|
|
14664
14713
|
nullable: true
|
|
14665
14714
|
})
|
|
14666
14715
|
], SkillCatalog.prototype, "searchVector", 2);
|
|
14667
14716
|
SkillCatalog = __decorateClass([
|
|
14668
|
-
|
|
14717
|
+
Entity83("skill_catalogs")
|
|
14669
14718
|
], SkillCatalog);
|
|
14670
14719
|
|
|
14671
14720
|
// src/entities/job-role.entity.ts
|
|
14672
|
-
import { Entity as
|
|
14721
|
+
import { Entity as Entity84, Column as Column85 } from "typeorm";
|
|
14673
14722
|
var JobRoles = class extends BaseEntity {
|
|
14674
14723
|
};
|
|
14675
14724
|
__decorateClass([
|
|
14676
|
-
|
|
14725
|
+
Column85({ name: "slug", type: "varchar", nullable: true, unique: true })
|
|
14677
14726
|
], JobRoles.prototype, "slug", 2);
|
|
14678
14727
|
__decorateClass([
|
|
14679
|
-
|
|
14728
|
+
Column85({ name: "name", type: "varchar", nullable: true })
|
|
14680
14729
|
], JobRoles.prototype, "name", 2);
|
|
14681
14730
|
__decorateClass([
|
|
14682
|
-
|
|
14731
|
+
Column85({ name: "is_active", type: "boolean", default: true })
|
|
14683
14732
|
], JobRoles.prototype, "isActive", 2);
|
|
14684
14733
|
JobRoles = __decorateClass([
|
|
14685
|
-
|
|
14734
|
+
Entity84("job_roles")
|
|
14686
14735
|
], JobRoles);
|
|
14687
14736
|
|
|
14688
14737
|
// src/entities/cms.entity.ts
|
|
14689
|
-
import { Entity as
|
|
14738
|
+
import { Entity as Entity85, Column as Column86 } from "typeorm";
|
|
14690
14739
|
var Cms = class extends BaseEntity {
|
|
14691
14740
|
};
|
|
14692
14741
|
__decorateClass([
|
|
14693
|
-
|
|
14742
|
+
Column86({ name: "title", type: "varchar", nullable: true })
|
|
14694
14743
|
], Cms.prototype, "title", 2);
|
|
14695
14744
|
__decorateClass([
|
|
14696
|
-
|
|
14745
|
+
Column86({ name: "slug", type: "varchar", nullable: true, unique: true })
|
|
14697
14746
|
], Cms.prototype, "slug", 2);
|
|
14698
14747
|
__decorateClass([
|
|
14699
|
-
|
|
14748
|
+
Column86({ name: "content", type: "varchar", nullable: true })
|
|
14700
14749
|
], Cms.prototype, "content", 2);
|
|
14701
14750
|
__decorateClass([
|
|
14702
|
-
|
|
14751
|
+
Column86({ name: "is_active", type: "boolean", default: true })
|
|
14703
14752
|
], Cms.prototype, "isActive", 2);
|
|
14704
14753
|
Cms = __decorateClass([
|
|
14705
|
-
|
|
14754
|
+
Entity85("cms")
|
|
14706
14755
|
], Cms);
|
|
14707
14756
|
|
|
14708
14757
|
// src/entities/lead.entity.ts
|
|
14709
14758
|
import {
|
|
14710
|
-
Entity as
|
|
14711
|
-
Column as
|
|
14759
|
+
Entity as Entity86,
|
|
14760
|
+
Column as Column87
|
|
14712
14761
|
} from "typeorm";
|
|
14713
14762
|
var CategoryEmum = /* @__PURE__ */ ((CategoryEmum2) => {
|
|
14714
14763
|
CategoryEmum2["BUSINESS"] = "BUSINESS";
|
|
@@ -14718,22 +14767,22 @@ var CategoryEmum = /* @__PURE__ */ ((CategoryEmum2) => {
|
|
|
14718
14767
|
var Lead = class extends BaseEntity {
|
|
14719
14768
|
};
|
|
14720
14769
|
__decorateClass([
|
|
14721
|
-
|
|
14770
|
+
Column87({ name: "name", type: "varchar", nullable: true })
|
|
14722
14771
|
], Lead.prototype, "name", 2);
|
|
14723
14772
|
__decorateClass([
|
|
14724
|
-
|
|
14773
|
+
Column87({ name: "mobile_code", type: "varchar", nullable: true })
|
|
14725
14774
|
], Lead.prototype, "mobileCode", 2);
|
|
14726
14775
|
__decorateClass([
|
|
14727
|
-
|
|
14776
|
+
Column87({ name: "mobile", type: "varchar", nullable: true })
|
|
14728
14777
|
], Lead.prototype, "mobile", 2);
|
|
14729
14778
|
__decorateClass([
|
|
14730
|
-
|
|
14779
|
+
Column87({ name: "email", type: "varchar", nullable: true })
|
|
14731
14780
|
], Lead.prototype, "email", 2);
|
|
14732
14781
|
__decorateClass([
|
|
14733
|
-
|
|
14782
|
+
Column87({ name: "description", type: "varchar", nullable: true })
|
|
14734
14783
|
], Lead.prototype, "description", 2);
|
|
14735
14784
|
__decorateClass([
|
|
14736
|
-
|
|
14785
|
+
Column87({
|
|
14737
14786
|
name: "category",
|
|
14738
14787
|
type: "enum",
|
|
14739
14788
|
enum: CategoryEmum,
|
|
@@ -14741,7 +14790,7 @@ __decorateClass([
|
|
|
14741
14790
|
})
|
|
14742
14791
|
], Lead.prototype, "category", 2);
|
|
14743
14792
|
Lead = __decorateClass([
|
|
14744
|
-
|
|
14793
|
+
Entity86("leads")
|
|
14745
14794
|
], Lead);
|
|
14746
14795
|
|
|
14747
14796
|
// src/entities/job-freelancer-recommendation.entity.ts
|
|
@@ -14982,7 +15031,7 @@ ClientFreelancerRecommendation = __decorateClass([
|
|
|
14982
15031
|
], ClientFreelancerRecommendation);
|
|
14983
15032
|
|
|
14984
15033
|
// src/entities/commission.entity.ts
|
|
14985
|
-
import { Entity as
|
|
15034
|
+
import { Entity as Entity87, Column as Column88 } from "typeorm";
|
|
14986
15035
|
var CommissionTypeEnum = /* @__PURE__ */ ((CommissionTypeEnum2) => {
|
|
14987
15036
|
CommissionTypeEnum2["PERCENTAGE"] = "PERCENTAGE";
|
|
14988
15037
|
CommissionTypeEnum2["FLAT"] = "FLAT";
|
|
@@ -14991,7 +15040,7 @@ var CommissionTypeEnum = /* @__PURE__ */ ((CommissionTypeEnum2) => {
|
|
|
14991
15040
|
var Commission = class extends BaseEntity {
|
|
14992
15041
|
};
|
|
14993
15042
|
__decorateClass([
|
|
14994
|
-
|
|
15043
|
+
Column88({
|
|
14995
15044
|
name: "freelancer_commission_type",
|
|
14996
15045
|
type: "enum",
|
|
14997
15046
|
enum: CommissionTypeEnum,
|
|
@@ -14999,10 +15048,10 @@ __decorateClass([
|
|
|
14999
15048
|
})
|
|
15000
15049
|
], Commission.prototype, "freelancerCommissionType", 2);
|
|
15001
15050
|
__decorateClass([
|
|
15002
|
-
|
|
15051
|
+
Column88({ name: "freelancer_commission", type: "integer", default: 0 })
|
|
15003
15052
|
], Commission.prototype, "freelancerCommission", 2);
|
|
15004
15053
|
__decorateClass([
|
|
15005
|
-
|
|
15054
|
+
Column88({
|
|
15006
15055
|
name: "client_commission_type",
|
|
15007
15056
|
type: "enum",
|
|
15008
15057
|
enum: CommissionTypeEnum,
|
|
@@ -15010,58 +15059,58 @@ __decorateClass([
|
|
|
15010
15059
|
})
|
|
15011
15060
|
], Commission.prototype, "clientCommissionType", 2);
|
|
15012
15061
|
__decorateClass([
|
|
15013
|
-
|
|
15062
|
+
Column88({ name: "client_commission", type: "integer", default: 0 })
|
|
15014
15063
|
], Commission.prototype, "clientCommission", 2);
|
|
15015
15064
|
Commission = __decorateClass([
|
|
15016
|
-
|
|
15065
|
+
Entity87("commissions")
|
|
15017
15066
|
], Commission);
|
|
15018
15067
|
|
|
15019
15068
|
// src/entities/calendly-meeting-log.entity.ts
|
|
15020
15069
|
import {
|
|
15021
|
-
Entity as
|
|
15022
|
-
Column as
|
|
15023
|
-
Index as
|
|
15070
|
+
Entity as Entity88,
|
|
15071
|
+
Column as Column89,
|
|
15072
|
+
Index as Index72
|
|
15024
15073
|
} from "typeorm";
|
|
15025
15074
|
var CalendlyMeetingLog = class extends BaseEntity {
|
|
15026
15075
|
};
|
|
15027
15076
|
__decorateClass([
|
|
15028
|
-
|
|
15029
|
-
|
|
15077
|
+
Column89({ name: "calendly_event_id", type: "varchar", nullable: true }),
|
|
15078
|
+
Index72()
|
|
15030
15079
|
], CalendlyMeetingLog.prototype, "calendlyEventId", 2);
|
|
15031
15080
|
__decorateClass([
|
|
15032
|
-
|
|
15081
|
+
Column89({ name: "calendly_event_type", type: "varchar", nullable: true })
|
|
15033
15082
|
], CalendlyMeetingLog.prototype, "calendlyEventType", 2);
|
|
15034
15083
|
__decorateClass([
|
|
15035
|
-
|
|
15084
|
+
Column89({ name: "raw_webhook_data", type: "jsonb", nullable: true })
|
|
15036
15085
|
], CalendlyMeetingLog.prototype, "rawWebhookData", 2);
|
|
15037
15086
|
CalendlyMeetingLog = __decorateClass([
|
|
15038
|
-
|
|
15087
|
+
Entity88("calendly_meeting_logs")
|
|
15039
15088
|
], CalendlyMeetingLog);
|
|
15040
15089
|
|
|
15041
15090
|
// src/entities/zoom-meeting-log.entity.ts
|
|
15042
15091
|
import {
|
|
15043
|
-
Entity as
|
|
15044
|
-
Column as
|
|
15045
|
-
Index as
|
|
15092
|
+
Entity as Entity89,
|
|
15093
|
+
Column as Column90,
|
|
15094
|
+
Index as Index73
|
|
15046
15095
|
} from "typeorm";
|
|
15047
15096
|
var ZoomMeetingLog = class extends BaseEntity {
|
|
15048
15097
|
};
|
|
15049
15098
|
__decorateClass([
|
|
15050
|
-
|
|
15051
|
-
|
|
15099
|
+
Column90({ name: "zoom_meeting_id", type: "varchar", nullable: true }),
|
|
15100
|
+
Index73()
|
|
15052
15101
|
], ZoomMeetingLog.prototype, "zoomMeetingId", 2);
|
|
15053
15102
|
__decorateClass([
|
|
15054
|
-
|
|
15103
|
+
Column90({ name: "zoom_event_type", type: "varchar", nullable: true })
|
|
15055
15104
|
], ZoomMeetingLog.prototype, "zoomEventType", 2);
|
|
15056
15105
|
__decorateClass([
|
|
15057
|
-
|
|
15106
|
+
Column90({ name: "raw_webhook_data", type: "jsonb", nullable: true })
|
|
15058
15107
|
], ZoomMeetingLog.prototype, "rawWebhookData", 2);
|
|
15059
15108
|
ZoomMeetingLog = __decorateClass([
|
|
15060
|
-
|
|
15109
|
+
Entity89("zoom_meeting_logs")
|
|
15061
15110
|
], ZoomMeetingLog);
|
|
15062
15111
|
|
|
15063
15112
|
// src/entities/docuseal.entity.ts
|
|
15064
|
-
import { Entity as
|
|
15113
|
+
import { Entity as Entity90, Column as Column91, Index as Index74 } from "typeorm";
|
|
15065
15114
|
var DocuSealTypeEnum = /* @__PURE__ */ ((DocuSealTypeEnum2) => {
|
|
15066
15115
|
DocuSealTypeEnum2["FREELANCER_SERVICE_AGGREMENT"] = "FREELANCER_SERVICE_AGGREMENT";
|
|
15067
15116
|
DocuSealTypeEnum2["CLIENT_SERVICE_AGGREMENT"] = "CLIENT_SERVICE_AGGREMENT";
|
|
@@ -15071,101 +15120,101 @@ var DocuSealTypeEnum = /* @__PURE__ */ ((DocuSealTypeEnum2) => {
|
|
|
15071
15120
|
var DocuSeal = class extends BaseEntity {
|
|
15072
15121
|
};
|
|
15073
15122
|
__decorateClass([
|
|
15074
|
-
|
|
15075
|
-
|
|
15123
|
+
Column91({ name: "reference_id", type: "integer", nullable: false }),
|
|
15124
|
+
Index74()
|
|
15076
15125
|
], DocuSeal.prototype, "referenceId", 2);
|
|
15077
15126
|
__decorateClass([
|
|
15078
|
-
|
|
15079
|
-
|
|
15127
|
+
Column91({ name: "submitter_id", type: "integer", nullable: true }),
|
|
15128
|
+
Index74()
|
|
15080
15129
|
], DocuSeal.prototype, "submitterId", 2);
|
|
15081
15130
|
__decorateClass([
|
|
15082
|
-
|
|
15131
|
+
Column91({ name: "submitter_response", type: "jsonb", nullable: true })
|
|
15083
15132
|
], DocuSeal.prototype, "submitterResponse", 2);
|
|
15084
15133
|
__decorateClass([
|
|
15085
|
-
|
|
15134
|
+
Column91({ name: "webhook_response", type: "jsonb", nullable: true })
|
|
15086
15135
|
], DocuSeal.prototype, "webhookResponse", 2);
|
|
15087
15136
|
__decorateClass([
|
|
15088
|
-
|
|
15137
|
+
Column91({ name: "type", type: "enum", enum: DocuSealTypeEnum, nullable: true })
|
|
15089
15138
|
], DocuSeal.prototype, "type", 2);
|
|
15090
15139
|
DocuSeal = __decorateClass([
|
|
15091
|
-
|
|
15140
|
+
Entity90("docuseal")
|
|
15092
15141
|
], DocuSeal);
|
|
15093
15142
|
|
|
15094
15143
|
// src/entities/stripe-logs.entity.ts
|
|
15095
|
-
import { Entity as
|
|
15144
|
+
import { Entity as Entity91, Column as Column92 } from "typeorm";
|
|
15096
15145
|
var StripeLog = class extends BaseEntity {
|
|
15097
15146
|
};
|
|
15098
15147
|
__decorateClass([
|
|
15099
|
-
|
|
15148
|
+
Column92({ name: "stripe_event_id", type: "varchar", nullable: true })
|
|
15100
15149
|
], StripeLog.prototype, "stripeEventId", 2);
|
|
15101
15150
|
__decorateClass([
|
|
15102
|
-
|
|
15151
|
+
Column92({ name: "event_type", type: "varchar", nullable: true })
|
|
15103
15152
|
], StripeLog.prototype, "eventType", 2);
|
|
15104
15153
|
__decorateClass([
|
|
15105
|
-
|
|
15154
|
+
Column92({ name: "stripe_account_id", type: "varchar", nullable: true })
|
|
15106
15155
|
], StripeLog.prototype, "stripeAccountId", 2);
|
|
15107
15156
|
__decorateClass([
|
|
15108
|
-
|
|
15157
|
+
Column92({ name: "raw_webhook_data", type: "jsonb", nullable: true })
|
|
15109
15158
|
], StripeLog.prototype, "rawWebhookData", 2);
|
|
15110
15159
|
StripeLog = __decorateClass([
|
|
15111
|
-
|
|
15160
|
+
Entity91("stripe_logs")
|
|
15112
15161
|
], StripeLog);
|
|
15113
15162
|
|
|
15114
15163
|
// src/entities/recommendation-weightage-config.entity.ts
|
|
15115
15164
|
import {
|
|
15116
|
-
Entity as
|
|
15117
|
-
Column as
|
|
15118
|
-
Index as
|
|
15165
|
+
Entity as Entity92,
|
|
15166
|
+
Column as Column93,
|
|
15167
|
+
Index as Index75
|
|
15119
15168
|
} from "typeorm";
|
|
15120
15169
|
var RecommendationWeightageConfig = class extends BaseEntity {
|
|
15121
15170
|
};
|
|
15122
15171
|
__decorateClass([
|
|
15123
|
-
|
|
15172
|
+
Column93({
|
|
15124
15173
|
type: "varchar",
|
|
15125
15174
|
length: 100,
|
|
15126
15175
|
unique: true,
|
|
15127
15176
|
comment: "Unique key identifier (e.g., full_time_weights, hourly_weights)"
|
|
15128
15177
|
}),
|
|
15129
|
-
|
|
15178
|
+
Index75()
|
|
15130
15179
|
], RecommendationWeightageConfig.prototype, "key", 2);
|
|
15131
15180
|
__decorateClass([
|
|
15132
|
-
|
|
15181
|
+
Column93({
|
|
15133
15182
|
type: "jsonb",
|
|
15134
15183
|
comment: "JSON object containing weight values",
|
|
15135
15184
|
nullable: true
|
|
15136
15185
|
})
|
|
15137
15186
|
], RecommendationWeightageConfig.prototype, "value", 2);
|
|
15138
15187
|
__decorateClass([
|
|
15139
|
-
|
|
15188
|
+
Column93({ name: "is_active", type: "boolean", default: true })
|
|
15140
15189
|
], RecommendationWeightageConfig.prototype, "isActive", 2);
|
|
15141
15190
|
RecommendationWeightageConfig = __decorateClass([
|
|
15142
|
-
|
|
15191
|
+
Entity92("recommendation_weightage_configs")
|
|
15143
15192
|
], RecommendationWeightageConfig);
|
|
15144
15193
|
|
|
15145
15194
|
// src/entities/global-setting.entity.ts
|
|
15146
15195
|
import {
|
|
15147
|
-
Entity as
|
|
15148
|
-
Column as
|
|
15149
|
-
Index as
|
|
15196
|
+
Entity as Entity93,
|
|
15197
|
+
Column as Column94,
|
|
15198
|
+
Index as Index76
|
|
15150
15199
|
} from "typeorm";
|
|
15151
15200
|
var GlobalSetting = class extends BaseEntity {
|
|
15152
15201
|
};
|
|
15153
15202
|
__decorateClass([
|
|
15154
|
-
|
|
15203
|
+
Column94({ name: "key", type: "varchar", length: 255, nullable: false, unique: true })
|
|
15155
15204
|
], GlobalSetting.prototype, "key", 2);
|
|
15156
15205
|
__decorateClass([
|
|
15157
|
-
|
|
15206
|
+
Column94({ name: "value", type: "text", nullable: false })
|
|
15158
15207
|
], GlobalSetting.prototype, "value", 2);
|
|
15159
15208
|
GlobalSetting = __decorateClass([
|
|
15160
|
-
|
|
15161
|
-
|
|
15209
|
+
Entity93("global_settings"),
|
|
15210
|
+
Index76(["key"], { unique: true })
|
|
15162
15211
|
], GlobalSetting);
|
|
15163
15212
|
|
|
15164
15213
|
// src/entities/plan.entity.ts
|
|
15165
15214
|
import {
|
|
15166
|
-
Entity as
|
|
15167
|
-
Column as
|
|
15168
|
-
Index as
|
|
15215
|
+
Entity as Entity96,
|
|
15216
|
+
Column as Column97,
|
|
15217
|
+
Index as Index79,
|
|
15169
15218
|
Check as Check4,
|
|
15170
15219
|
BeforeInsert as BeforeInsert2,
|
|
15171
15220
|
BeforeUpdate as BeforeUpdate2,
|
|
@@ -15174,57 +15223,57 @@ import {
|
|
|
15174
15223
|
|
|
15175
15224
|
// src/entities/plan-feature.entity.ts
|
|
15176
15225
|
import {
|
|
15177
|
-
Entity as
|
|
15178
|
-
Column as
|
|
15179
|
-
ManyToOne as
|
|
15180
|
-
JoinColumn as
|
|
15181
|
-
Index as
|
|
15226
|
+
Entity as Entity94,
|
|
15227
|
+
Column as Column95,
|
|
15228
|
+
ManyToOne as ManyToOne76,
|
|
15229
|
+
JoinColumn as JoinColumn77,
|
|
15230
|
+
Index as Index77,
|
|
15182
15231
|
Check as Check2
|
|
15183
15232
|
} from "typeorm";
|
|
15184
15233
|
var PlanFeature = class extends BaseEntity {
|
|
15185
15234
|
};
|
|
15186
15235
|
// individual index to find features by plan
|
|
15187
15236
|
__decorateClass([
|
|
15188
|
-
|
|
15189
|
-
|
|
15237
|
+
Column95({ name: "plan_id", type: "integer", nullable: false }),
|
|
15238
|
+
Index77()
|
|
15190
15239
|
], PlanFeature.prototype, "planId", 2);
|
|
15191
15240
|
__decorateClass([
|
|
15192
|
-
|
|
15241
|
+
ManyToOne76(() => Plan, (plan) => plan.features, {
|
|
15193
15242
|
onDelete: "CASCADE",
|
|
15194
15243
|
nullable: false
|
|
15195
15244
|
}),
|
|
15196
|
-
|
|
15245
|
+
JoinColumn77({ name: "plan_id" })
|
|
15197
15246
|
], PlanFeature.prototype, "plan", 2);
|
|
15198
15247
|
__decorateClass([
|
|
15199
|
-
|
|
15248
|
+
Column95({ name: "name", type: "varchar", length: 200 })
|
|
15200
15249
|
], PlanFeature.prototype, "name", 2);
|
|
15201
15250
|
__decorateClass([
|
|
15202
|
-
|
|
15203
|
-
|
|
15251
|
+
Column95({ name: "slug", type: "varchar", length: 100 }),
|
|
15252
|
+
Index77()
|
|
15204
15253
|
], PlanFeature.prototype, "slug", 2);
|
|
15205
15254
|
__decorateClass([
|
|
15206
|
-
|
|
15255
|
+
Column95({ name: "tooltip", type: "varchar", length: 300, nullable: true })
|
|
15207
15256
|
], PlanFeature.prototype, "tooltip", 2);
|
|
15208
15257
|
__decorateClass([
|
|
15209
|
-
|
|
15258
|
+
Column95({ name: "sort_order", type: "smallint", default: 0 })
|
|
15210
15259
|
], PlanFeature.prototype, "sortOrder", 2);
|
|
15211
15260
|
__decorateClass([
|
|
15212
|
-
|
|
15261
|
+
Column95({ name: "is_active", type: "boolean", default: true })
|
|
15213
15262
|
], PlanFeature.prototype, "isActive", 2);
|
|
15214
15263
|
PlanFeature = __decorateClass([
|
|
15215
|
-
|
|
15216
|
-
|
|
15217
|
-
|
|
15264
|
+
Entity94("plan_features"),
|
|
15265
|
+
Index77("idx_plan_features_plan_id", ["planId"]),
|
|
15266
|
+
Index77("idx_plan_features_plan_sort", ["planId", "sortOrder"]),
|
|
15218
15267
|
Check2("chk_plan_features_sort_order_positive", '"sort_order" >= 0')
|
|
15219
15268
|
], PlanFeature);
|
|
15220
15269
|
|
|
15221
15270
|
// src/entities/plan-pricing.entity.ts
|
|
15222
15271
|
import {
|
|
15223
|
-
Entity as
|
|
15224
|
-
Column as
|
|
15225
|
-
ManyToOne as
|
|
15226
|
-
JoinColumn as
|
|
15227
|
-
Index as
|
|
15272
|
+
Entity as Entity95,
|
|
15273
|
+
Column as Column96,
|
|
15274
|
+
ManyToOne as ManyToOne77,
|
|
15275
|
+
JoinColumn as JoinColumn78,
|
|
15276
|
+
Index as Index78,
|
|
15228
15277
|
Unique,
|
|
15229
15278
|
Check as Check3,
|
|
15230
15279
|
BeforeInsert,
|
|
@@ -15284,56 +15333,56 @@ var PlanPricing = class extends BaseEntity {
|
|
|
15284
15333
|
};
|
|
15285
15334
|
// individual index to find pricing by plan
|
|
15286
15335
|
__decorateClass([
|
|
15287
|
-
|
|
15288
|
-
|
|
15336
|
+
Column96({ name: "plan_id", type: "integer", nullable: false }),
|
|
15337
|
+
Index78()
|
|
15289
15338
|
], PlanPricing.prototype, "planId", 2);
|
|
15290
15339
|
__decorateClass([
|
|
15291
|
-
|
|
15340
|
+
ManyToOne77(() => Plan, (plan) => plan.pricing, {
|
|
15292
15341
|
onDelete: "CASCADE",
|
|
15293
15342
|
nullable: false
|
|
15294
15343
|
}),
|
|
15295
|
-
|
|
15344
|
+
JoinColumn78({ name: "plan_id" })
|
|
15296
15345
|
], PlanPricing.prototype, "plan", 2);
|
|
15297
15346
|
__decorateClass([
|
|
15298
|
-
|
|
15347
|
+
Column96({
|
|
15299
15348
|
name: "billing_cycle",
|
|
15300
15349
|
type: "enum",
|
|
15301
15350
|
enum: PlanPricingBillingCycleEnum
|
|
15302
15351
|
})
|
|
15303
15352
|
], PlanPricing.prototype, "billingCycle", 2);
|
|
15304
15353
|
__decorateClass([
|
|
15305
|
-
|
|
15354
|
+
Column96({ name: "price", type: "decimal", precision: 10, scale: 2, default: 0 })
|
|
15306
15355
|
], PlanPricing.prototype, "price", 2);
|
|
15307
15356
|
__decorateClass([
|
|
15308
|
-
|
|
15357
|
+
Column96({ name: "original_price", type: "decimal", precision: 10, scale: 2, nullable: true })
|
|
15309
15358
|
], PlanPricing.prototype, "originalPrice", 2);
|
|
15310
15359
|
__decorateClass([
|
|
15311
|
-
|
|
15360
|
+
Column96({ name: "discount_pct", type: "decimal", precision: 5, scale: 2, nullable: true })
|
|
15312
15361
|
], PlanPricing.prototype, "discountPct", 2);
|
|
15313
15362
|
__decorateClass([
|
|
15314
|
-
|
|
15363
|
+
Column96({ name: "currency", type: "varchar", length: 3, default: "USD" })
|
|
15315
15364
|
], PlanPricing.prototype, "currency", 2);
|
|
15316
15365
|
__decorateClass([
|
|
15317
|
-
|
|
15366
|
+
Column96({ name: "is_free", type: "boolean", default: false })
|
|
15318
15367
|
], PlanPricing.prototype, "isFree", 2);
|
|
15319
15368
|
__decorateClass([
|
|
15320
|
-
|
|
15369
|
+
Column96({ name: "stripe_price_id", type: "varchar", length: 100, nullable: true, unique: true })
|
|
15321
15370
|
], PlanPricing.prototype, "stripePriceId", 2);
|
|
15322
15371
|
__decorateClass([
|
|
15323
|
-
|
|
15372
|
+
Column96({ name: "trial_days", type: "smallint", default: 0 })
|
|
15324
15373
|
], PlanPricing.prototype, "trialDays", 2);
|
|
15325
15374
|
__decorateClass([
|
|
15326
|
-
|
|
15375
|
+
Column96({ name: "is_active", type: "boolean", default: true })
|
|
15327
15376
|
], PlanPricing.prototype, "isActive", 2);
|
|
15328
15377
|
__decorateClass([
|
|
15329
15378
|
BeforeInsert(),
|
|
15330
15379
|
BeforeUpdate()
|
|
15331
15380
|
], PlanPricing.prototype, "sanitize", 1);
|
|
15332
15381
|
PlanPricing = __decorateClass([
|
|
15333
|
-
|
|
15382
|
+
Entity95("plan_pricings"),
|
|
15334
15383
|
Unique("uq_plan_pricings_plan_cycle", ["planId", "billingCycle"]),
|
|
15335
|
-
|
|
15336
|
-
|
|
15384
|
+
Index78("idx_plan_pricings_plan_id", ["planId"]),
|
|
15385
|
+
Index78("idx_plan_pricings_active", ["isActive", "billingCycle"]),
|
|
15337
15386
|
Check3("chk_plan_pricings_free_price_zero", '("is_free" = false) OR ("is_free" = true AND "price" = 0)'),
|
|
15338
15387
|
Check3("chk_plan_pricings_trial_days_non_negative", '"trial_days" >= 0'),
|
|
15339
15388
|
Check3("chk_plan_pricings_discount_range", '"discount_pct" IS NULL OR ("discount_pct" >= 1 AND "discount_pct" <= 99)'),
|
|
@@ -15355,22 +15404,22 @@ var Plan = class extends BaseEntity {
|
|
|
15355
15404
|
}
|
|
15356
15405
|
};
|
|
15357
15406
|
__decorateClass([
|
|
15358
|
-
|
|
15407
|
+
Column97({ name: "name", type: "varchar", length: 100 })
|
|
15359
15408
|
], Plan.prototype, "name", 2);
|
|
15360
15409
|
__decorateClass([
|
|
15361
|
-
|
|
15410
|
+
Column97({ name: "slug", type: "varchar", length: 100 })
|
|
15362
15411
|
], Plan.prototype, "slug", 2);
|
|
15363
15412
|
__decorateClass([
|
|
15364
|
-
|
|
15413
|
+
Column97({ name: "badge_label", type: "varchar", length: 60, nullable: true })
|
|
15365
15414
|
], Plan.prototype, "badgeLabel", 2);
|
|
15366
15415
|
__decorateClass([
|
|
15367
|
-
|
|
15416
|
+
Column97({ name: "sort_order", type: "smallint", default: 0 })
|
|
15368
15417
|
], Plan.prototype, "sortOrder", 2);
|
|
15369
15418
|
__decorateClass([
|
|
15370
|
-
|
|
15419
|
+
Column97({ name: "is_active", type: "boolean", default: true })
|
|
15371
15420
|
], Plan.prototype, "isActive", 2);
|
|
15372
15421
|
__decorateClass([
|
|
15373
|
-
|
|
15422
|
+
Column97({
|
|
15374
15423
|
name: "plan_type",
|
|
15375
15424
|
type: "enum",
|
|
15376
15425
|
enum: PlanTypeEnum,
|
|
@@ -15378,10 +15427,10 @@ __decorateClass([
|
|
|
15378
15427
|
})
|
|
15379
15428
|
], Plan.prototype, "planType", 2);
|
|
15380
15429
|
__decorateClass([
|
|
15381
|
-
|
|
15430
|
+
Column97({ name: "metadata", type: "jsonb", default: {} })
|
|
15382
15431
|
], Plan.prototype, "metadata", 2);
|
|
15383
15432
|
__decorateClass([
|
|
15384
|
-
|
|
15433
|
+
Column97({ name: "stripe_product_id", type: "varchar", length: 100, nullable: true })
|
|
15385
15434
|
], Plan.prototype, "stripeProductId", 2);
|
|
15386
15435
|
__decorateClass([
|
|
15387
15436
|
BeforeInsert2(),
|
|
@@ -15398,21 +15447,21 @@ __decorateClass([
|
|
|
15398
15447
|
})
|
|
15399
15448
|
], Plan.prototype, "pricing", 2);
|
|
15400
15449
|
Plan = __decorateClass([
|
|
15401
|
-
|
|
15402
|
-
|
|
15450
|
+
Entity96("plans"),
|
|
15451
|
+
Index79("idx_plans_slug_plan_type", ["slug", "planType"], {
|
|
15403
15452
|
unique: true,
|
|
15404
15453
|
where: '"is_deleted" IS FALSE'
|
|
15405
15454
|
}),
|
|
15406
|
-
|
|
15455
|
+
Index79("idx_plans_active_sort", ["isActive", "sortOrder"]),
|
|
15407
15456
|
Check4("chk_plans_sort_order_positive", '"sort_order" >= 0')
|
|
15408
15457
|
], Plan);
|
|
15409
15458
|
|
|
15410
15459
|
// src/entities/subscription-feature.entity.ts
|
|
15411
15460
|
import {
|
|
15412
|
-
Entity as
|
|
15413
|
-
Column as
|
|
15461
|
+
Entity as Entity97,
|
|
15462
|
+
Column as Column98,
|
|
15414
15463
|
Check as Check5,
|
|
15415
|
-
Index as
|
|
15464
|
+
Index as Index80,
|
|
15416
15465
|
BeforeInsert as BeforeInsert3,
|
|
15417
15466
|
BeforeUpdate as BeforeUpdate3
|
|
15418
15467
|
} from "typeorm";
|
|
@@ -15430,33 +15479,33 @@ var SubscriptionFeature = class extends BaseEntity {
|
|
|
15430
15479
|
}
|
|
15431
15480
|
};
|
|
15432
15481
|
__decorateClass([
|
|
15433
|
-
|
|
15482
|
+
Column98({ name: "name", type: "varchar", length: 200 })
|
|
15434
15483
|
], SubscriptionFeature.prototype, "name", 2);
|
|
15435
15484
|
__decorateClass([
|
|
15436
|
-
|
|
15485
|
+
Column98({ name: "slug", type: "varchar", length: 100 })
|
|
15437
15486
|
], SubscriptionFeature.prototype, "slug", 2);
|
|
15438
15487
|
__decorateClass([
|
|
15439
|
-
|
|
15488
|
+
Column98({ name: "tooltip", type: "varchar", length: 300, nullable: true })
|
|
15440
15489
|
], SubscriptionFeature.prototype, "tooltip", 2);
|
|
15441
15490
|
__decorateClass([
|
|
15442
|
-
|
|
15491
|
+
Column98({ name: "sort_order", type: "smallint", default: 0 })
|
|
15443
15492
|
], SubscriptionFeature.prototype, "sortOrder", 2);
|
|
15444
15493
|
__decorateClass([
|
|
15445
|
-
|
|
15494
|
+
Column98({ name: "is_active", type: "boolean", default: true })
|
|
15446
15495
|
], SubscriptionFeature.prototype, "isActive", 2);
|
|
15447
15496
|
__decorateClass([
|
|
15448
15497
|
BeforeInsert3(),
|
|
15449
15498
|
BeforeUpdate3()
|
|
15450
15499
|
], SubscriptionFeature.prototype, "createSlug", 1);
|
|
15451
15500
|
SubscriptionFeature = __decorateClass([
|
|
15452
|
-
|
|
15453
|
-
|
|
15454
|
-
|
|
15501
|
+
Entity97("subscription_features"),
|
|
15502
|
+
Index80("idx_subscription_features_slug", ["slug"], { unique: true, where: '"is_deleted" IS FALSE' }),
|
|
15503
|
+
Index80("idx_subscription_features_active_sort", ["isActive", "sortOrder"]),
|
|
15455
15504
|
Check5("chk_subscription_features_sort_order_positive", '"sort_order" >= 0')
|
|
15456
15505
|
], SubscriptionFeature);
|
|
15457
15506
|
|
|
15458
15507
|
// src/entities/user-subscription-transaction.entity.ts
|
|
15459
|
-
import { Entity as
|
|
15508
|
+
import { Entity as Entity98, Column as Column99, Index as Index81, ManyToOne as ManyToOne78, JoinColumn as JoinColumn79 } from "typeorm";
|
|
15460
15509
|
var UserSubscriptionTransactionTypeEnum = /* @__PURE__ */ ((UserSubscriptionTransactionTypeEnum2) => {
|
|
15461
15510
|
UserSubscriptionTransactionTypeEnum2["SUBSCRIPTION_INITIATED"] = "SUBSCRIPTION_INITIATED";
|
|
15462
15511
|
UserSubscriptionTransactionTypeEnum2["CHECKOUT_SESSION_CREATED"] = "CHECKOUT_SESSION_CREATED";
|
|
@@ -15474,25 +15523,25 @@ var UserSubscriptionTransactionStatusEnum = /* @__PURE__ */ ((UserSubscriptionTr
|
|
|
15474
15523
|
var UserSubscriptionTransaction = class extends BaseEntity {
|
|
15475
15524
|
};
|
|
15476
15525
|
__decorateClass([
|
|
15477
|
-
|
|
15478
|
-
|
|
15526
|
+
Column99({ name: "user_subscription_id", type: "integer", nullable: false }),
|
|
15527
|
+
Index81()
|
|
15479
15528
|
], UserSubscriptionTransaction.prototype, "userSubscriptionId", 2);
|
|
15480
15529
|
__decorateClass([
|
|
15481
|
-
|
|
15482
|
-
|
|
15530
|
+
ManyToOne78(() => UserSubscription, { onDelete: "CASCADE", nullable: false }),
|
|
15531
|
+
JoinColumn79({ name: "user_subscription_id" })
|
|
15483
15532
|
], UserSubscriptionTransaction.prototype, "userSubscription", 2);
|
|
15484
15533
|
__decorateClass([
|
|
15485
|
-
|
|
15534
|
+
Column99({ name: "user_id", type: "integer", nullable: false })
|
|
15486
15535
|
], UserSubscriptionTransaction.prototype, "userId", 2);
|
|
15487
15536
|
__decorateClass([
|
|
15488
|
-
|
|
15537
|
+
Column99({
|
|
15489
15538
|
name: "type",
|
|
15490
15539
|
type: "enum",
|
|
15491
15540
|
enum: UserSubscriptionTransactionTypeEnum
|
|
15492
15541
|
})
|
|
15493
15542
|
], UserSubscriptionTransaction.prototype, "type", 2);
|
|
15494
15543
|
__decorateClass([
|
|
15495
|
-
|
|
15544
|
+
Column99({
|
|
15496
15545
|
name: "status",
|
|
15497
15546
|
type: "enum",
|
|
15498
15547
|
enum: UserSubscriptionTransactionStatusEnum,
|
|
@@ -15500,49 +15549,49 @@ __decorateClass([
|
|
|
15500
15549
|
})
|
|
15501
15550
|
], UserSubscriptionTransaction.prototype, "status", 2);
|
|
15502
15551
|
__decorateClass([
|
|
15503
|
-
|
|
15552
|
+
Column99({ name: "plan_name", type: "text", nullable: true })
|
|
15504
15553
|
], UserSubscriptionTransaction.prototype, "planName", 2);
|
|
15505
15554
|
__decorateClass([
|
|
15506
|
-
|
|
15555
|
+
Column99({ name: "amount_minor", type: "integer", nullable: true })
|
|
15507
15556
|
], UserSubscriptionTransaction.prototype, "amountMinor", 2);
|
|
15508
15557
|
__decorateClass([
|
|
15509
|
-
|
|
15558
|
+
Column99({ name: "currency", type: "varchar", length: 3, nullable: true })
|
|
15510
15559
|
], UserSubscriptionTransaction.prototype, "currency", 2);
|
|
15511
15560
|
__decorateClass([
|
|
15512
|
-
|
|
15561
|
+
Column99({ name: "stripe_event_id", type: "varchar", length: 255, nullable: true })
|
|
15513
15562
|
], UserSubscriptionTransaction.prototype, "stripeEventId", 2);
|
|
15514
15563
|
__decorateClass([
|
|
15515
|
-
|
|
15564
|
+
Column99({ name: "stripe_event_type", type: "varchar", length: 120, nullable: true })
|
|
15516
15565
|
], UserSubscriptionTransaction.prototype, "stripeEventType", 2);
|
|
15517
15566
|
__decorateClass([
|
|
15518
|
-
|
|
15567
|
+
Column99({ name: "stripe_subscription_id", type: "varchar", length: 64, nullable: true })
|
|
15519
15568
|
], UserSubscriptionTransaction.prototype, "stripeSubscriptionId", 2);
|
|
15520
15569
|
__decorateClass([
|
|
15521
|
-
|
|
15570
|
+
Column99({ name: "stripe_invoice_id", type: "varchar", length: 255, nullable: true })
|
|
15522
15571
|
], UserSubscriptionTransaction.prototype, "stripeInvoiceId", 2);
|
|
15523
15572
|
__decorateClass([
|
|
15524
|
-
|
|
15573
|
+
Column99({ name: "description", type: "text", nullable: true })
|
|
15525
15574
|
], UserSubscriptionTransaction.prototype, "description", 2);
|
|
15526
15575
|
__decorateClass([
|
|
15527
|
-
|
|
15576
|
+
Column99({ name: "invoice_url", type: "text", nullable: true })
|
|
15528
15577
|
], UserSubscriptionTransaction.prototype, "invoiceUrl", 2);
|
|
15529
15578
|
__decorateClass([
|
|
15530
|
-
|
|
15579
|
+
Column99({ name: "checkout_request_payload", type: "jsonb", nullable: true })
|
|
15531
15580
|
], UserSubscriptionTransaction.prototype, "checkoutRequestPayload", 2);
|
|
15532
15581
|
__decorateClass([
|
|
15533
|
-
|
|
15582
|
+
Column99({ name: "checkout_response_payload", type: "jsonb", nullable: true })
|
|
15534
15583
|
], UserSubscriptionTransaction.prototype, "checkoutResponsePayload", 2);
|
|
15535
15584
|
__decorateClass([
|
|
15536
|
-
|
|
15585
|
+
Column99({ name: "webhook_payload", type: "jsonb", nullable: true })
|
|
15537
15586
|
], UserSubscriptionTransaction.prototype, "webhookPayload", 2);
|
|
15538
15587
|
__decorateClass([
|
|
15539
|
-
|
|
15588
|
+
Column99({ name: "metadata", type: "jsonb", nullable: true, default: {} })
|
|
15540
15589
|
], UserSubscriptionTransaction.prototype, "metadata", 2);
|
|
15541
15590
|
UserSubscriptionTransaction = __decorateClass([
|
|
15542
|
-
|
|
15543
|
-
|
|
15544
|
-
|
|
15545
|
-
|
|
15591
|
+
Entity98("user_subscription_transactions"),
|
|
15592
|
+
Index81("idx_user_sub_tx_user_subscription_id", ["userSubscriptionId"]),
|
|
15593
|
+
Index81("idx_user_sub_tx_user_id", ["userId"]),
|
|
15594
|
+
Index81("idx_user_sub_tx_stripe_event_id", ["stripeEventId"])
|
|
15546
15595
|
], UserSubscriptionTransaction);
|
|
15547
15596
|
export {
|
|
15548
15597
|
ADMIN_FREELANCER_PATTERN,
|
|
@@ -15633,6 +15682,7 @@ export {
|
|
|
15633
15682
|
Cms,
|
|
15634
15683
|
Commission,
|
|
15635
15684
|
CommissionTypeEnum,
|
|
15685
|
+
CompanyMember,
|
|
15636
15686
|
CompanyMemberRole,
|
|
15637
15687
|
CompanyOnboardingStepEnum,
|
|
15638
15688
|
CompanyProfile,
|