@experts_hub/shared 1.0.135 → 1.0.137

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/index.js CHANGED
@@ -564,1528 +564,1504 @@ var CLIENT_PROFILE_PATTERN = {
564
564
 
565
565
  // src/modules/user/client-profile/dto/update-client-profile.dto.ts
566
566
  var import_class_validator17 = require("class-validator");
567
-
568
- // src/entities/company-profile.entity.ts
569
- var import_typeorm16 = require("typeorm");
570
-
571
- // src/entities/base.entity.ts
572
- var import_typeorm = require("typeorm");
573
- var BaseEntity = class {
567
+ var UpdateCompanyProfileDto = class {
574
568
  };
575
569
  __decorateClass([
576
- (0, import_typeorm.PrimaryGeneratedColumn)("increment", { type: "integer" })
577
- ], BaseEntity.prototype, "id", 2);
578
- __decorateClass([
579
- (0, import_typeorm.Column)({ type: "uuid" }),
580
- (0, import_typeorm.Generated)("uuid")
581
- ], BaseEntity.prototype, "uuid", 2);
570
+ (0, import_class_validator17.IsNotEmpty)({ message: "Please enter company name." }),
571
+ (0, import_class_validator17.IsString)({ message: "Company name must be a string." }),
572
+ (0, import_class_validator17.Length)(2, 255, {
573
+ message: "Company name must be between 2 and 255 characters"
574
+ })
575
+ ], UpdateCompanyProfileDto.prototype, "companyName", 2);
582
576
  __decorateClass([
583
- (0, import_typeorm.CreateDateColumn)({ name: "created_at", type: "timestamp with time zone" })
584
- ], BaseEntity.prototype, "createdAt", 2);
577
+ (0, import_class_validator17.IsNotEmpty)({ message: "Please enter company website url." }),
578
+ (0, import_class_validator17.IsUrl)({}, { message: "Invalid website URL format" })
579
+ ], UpdateCompanyProfileDto.prototype, "webSite", 2);
585
580
  __decorateClass([
586
- (0, import_typeorm.Column)({ name: "created_by", type: "integer", nullable: true })
587
- ], BaseEntity.prototype, "createdBy", 2);
581
+ (0, import_class_validator17.IsNotEmpty)({ message: "Please enter company address." }),
582
+ (0, import_class_validator17.IsString)({ message: "Company address must be a string" }),
583
+ (0, import_class_validator17.Length)(5, 1e3, { message: "Address must be between 5 and 1000 characters" })
584
+ ], UpdateCompanyProfileDto.prototype, "companyAddress", 2);
588
585
  __decorateClass([
589
- (0, import_typeorm.UpdateDateColumn)({ name: "updated_at", type: "timestamp with time zone" })
590
- ], BaseEntity.prototype, "updatedAt", 2);
586
+ (0, import_class_validator17.IsNotEmpty)({ message: "Please enter phone number." }),
587
+ (0, import_class_validator17.Matches)(/^(\+1\s?)?(\(?\d{3}\)?[\s.-]?)?\d{3}[\s.-]?\d{4}$/, {
588
+ message: "Please enter a valid US phone number"
589
+ })
590
+ ], UpdateCompanyProfileDto.prototype, "phoneNumber", 2);
591
591
  __decorateClass([
592
- (0, import_typeorm.Column)({ name: "updated_by", type: "integer", nullable: true })
593
- ], BaseEntity.prototype, "updatedBy", 2);
592
+ (0, import_class_validator17.IsNotEmpty)({ message: "Please enter email." }),
593
+ (0, import_class_validator17.IsEmail)()
594
+ ], UpdateCompanyProfileDto.prototype, "email", 2);
594
595
  __decorateClass([
595
- (0, import_typeorm.Column)({ name: "is_deleted", type: "boolean", default: false })
596
- ], BaseEntity.prototype, "isDeleted", 2);
596
+ (0, import_class_validator17.IsString)({ message: "About company must be a string." })
597
+ ], UpdateCompanyProfileDto.prototype, "aboutCompany", 2);
598
+
599
+ // src/modules/user/client-profile/dto/client-change-password.dto.ts
600
+ var import_class_validator18 = require("class-validator");
601
+ var ClientChangePasswordDto = class {
602
+ };
597
603
  __decorateClass([
598
- (0, import_typeorm.Column)({ name: "deleted_by", type: "integer", nullable: true })
599
- ], BaseEntity.prototype, "deletedBy", 2);
604
+ (0, import_class_validator18.IsNotEmpty)({ message: "Please enter Old Password." }),
605
+ (0, import_class_validator18.IsString)()
606
+ ], ClientChangePasswordDto.prototype, "oldPassword", 2);
600
607
  __decorateClass([
601
- (0, import_typeorm.DeleteDateColumn)({
602
- name: "deleted_at",
603
- type: "timestamp with time zone",
604
- nullable: true
608
+ (0, import_class_validator18.IsNotEmpty)({ message: "Please enter New Password." }),
609
+ (0, import_class_validator18.IsString)(),
610
+ (0, import_class_validator18.MinLength)(6),
611
+ (0, import_class_validator18.MaxLength)(32),
612
+ (0, import_class_validator18.Matches)(/^(?=.*[A-Za-z])(?=.*\d)(?=.*[@$!%*?&])/, {
613
+ message: "New Password must include letters, numbers and symbols."
605
614
  })
606
- ], BaseEntity.prototype, "deletedAt", 2);
615
+ ], ClientChangePasswordDto.prototype, "newPassword", 2);
607
616
 
608
- // src/entities/user.entity.ts
609
- var import_typeorm15 = require("typeorm");
617
+ // src/modules/question/pattern/pattern.ts
618
+ var QUESTION_PATTERN = {
619
+ fetchQuestions: "fetch.questions"
620
+ };
610
621
 
611
- // src/entities/refresh-token.entity.ts
612
- var import_typeorm2 = require("typeorm");
613
- var RefreshToken = class {
622
+ // src/modules/question/dto/create-question.dto.ts
623
+ var import_class_validator19 = require("class-validator");
624
+ var CreateQuestionDto = class {
614
625
  };
615
626
  __decorateClass([
616
- (0, import_typeorm2.PrimaryGeneratedColumn)("uuid")
617
- ], RefreshToken.prototype, "id", 2);
618
- __decorateClass([
619
- (0, import_typeorm2.Column)({ name: "user_id", type: "integer" })
620
- ], RefreshToken.prototype, "userId", 2);
621
- __decorateClass([
622
- (0, import_typeorm2.Column)({ name: "token_id", type: "varchar" })
623
- ], RefreshToken.prototype, "tokenId", 2);
624
- __decorateClass([
625
- (0, import_typeorm2.Column)({ name: "device_info", type: "json", nullable: true })
626
- ], RefreshToken.prototype, "deviceInfo", 2);
627
- __decorateClass([
628
- (0, import_typeorm2.Column)({ name: "is_revoked", type: "boolean", default: false })
629
- ], RefreshToken.prototype, "isRevoked", 2);
627
+ (0, import_class_validator19.IsNotEmpty)({ message: "Please enter unique id." })
628
+ ], CreateQuestionDto.prototype, "questionId", 2);
630
629
  __decorateClass([
631
- (0, import_typeorm2.Column)({ name: "expires_at", type: "timestamp with time zone" })
632
- ], RefreshToken.prototype, "expiresAt", 2);
630
+ (0, import_class_validator19.IsNotEmpty)({ message: "Please enter question." })
631
+ ], CreateQuestionDto.prototype, "question", 2);
633
632
  __decorateClass([
634
- (0, import_typeorm2.CreateDateColumn)({ name: "created_at", type: "timestamp with time zone" })
635
- ], RefreshToken.prototype, "createdAt", 2);
633
+ (0, import_class_validator19.IsNotEmpty)({ message: "Please enter for whom the question is." })
634
+ ], CreateQuestionDto.prototype, "questionFor", 2);
636
635
  __decorateClass([
637
- (0, import_typeorm2.UpdateDateColumn)({ name: "updated_at", type: "timestamp with time zone" })
638
- ], RefreshToken.prototype, "updatedAt", 2);
636
+ (0, import_class_validator19.IsNotEmpty)({ message: "Please enter options." })
637
+ ], CreateQuestionDto.prototype, "options", 2);
639
638
  __decorateClass([
640
- (0, import_typeorm2.ManyToOne)(() => User, (user) => user.refreshTokens),
641
- (0, import_typeorm2.JoinColumn)({ name: "user_id" })
642
- ], RefreshToken.prototype, "user", 2);
643
- RefreshToken = __decorateClass([
644
- (0, import_typeorm2.Entity)("refresh_tokens")
645
- ], RefreshToken);
639
+ (0, import_class_validator19.IsOptional)(),
640
+ (0, import_class_validator19.IsBoolean)({ message: "Whether the question status active" })
641
+ ], CreateQuestionDto.prototype, "isActive", 2);
646
642
 
647
- // src/entities/senseloaf-log.entity.ts
648
- var import_typeorm3 = require("typeorm");
649
- var SenseloafLog = class {
643
+ // src/modules/job/pattern/pattern.ts
644
+ var JOB_ROLE_PATTERN = {
645
+ fetchJobRolesForDropdown: "fetch.job.roles.for.dropdown"
646
+ };
647
+ var JOB_PATTERN = {
648
+ fetchJobs: "fetch.jobs",
649
+ fetchJobCountAsPerStatus: "fetch.job.count.as.per.status",
650
+ fetchJobsDropdown: "fetch.jobs.dropdown",
651
+ fetchJobDetail: "fetch.job.details",
652
+ handleJdUpload: "handle.jd.upload",
653
+ fetchJobBasicInformation: "fetch.job.basic.information",
654
+ createJobBasicInformation: "create.job.basic.information",
655
+ updateJobBasicInformation: "update.job.basic.information",
656
+ fetchJobAdditionalComments: "fetch.job.additional.comments",
657
+ updateJobAdditionalComments: "update.job.additional.comments",
658
+ fetchJobDescription: "fetch.job.description",
659
+ updateJobDescription: "update.job.description",
660
+ updateJobStatus: "update.job.status",
661
+ searchJobsByRoleAndSkills: "search.jobs.by.role.and.skills"
662
+ };
663
+
664
+ // src/modules/job/dto/job-basic-information.dto.ts
665
+ var import_class_validator20 = require("class-validator");
666
+ var import_class_transformer = require("class-transformer");
667
+ var JobLocation = /* @__PURE__ */ ((JobLocation2) => {
668
+ JobLocation2["ONSITE"] = "ONSITE";
669
+ JobLocation2["REMOTE"] = "REMOTE";
670
+ JobLocation2["BOTH"] = "BOTH";
671
+ return JobLocation2;
672
+ })(JobLocation || {});
673
+ var EmploymentType = /* @__PURE__ */ ((EmploymentType2) => {
674
+ EmploymentType2["FULLTIME"] = "FULLTIME";
675
+ EmploymentType2["PARTTIME"] = "PARTTIME";
676
+ EmploymentType2["BOTH"] = "BOTH";
677
+ return EmploymentType2;
678
+ })(EmploymentType || {});
679
+ var JobBasicInformationDto = class {
650
680
  };
651
681
  __decorateClass([
652
- (0, import_typeorm3.PrimaryGeneratedColumn)("increment", { type: "integer" })
653
- ], SenseloafLog.prototype, "id", 2);
654
- __decorateClass([
655
- (0, import_typeorm3.Column)({ name: "user_id", type: "integer", nullable: true })
656
- ], SenseloafLog.prototype, "userId", 2);
682
+ (0, import_class_validator20.IsNotEmpty)({ message: "Please enter job role" }),
683
+ (0, import_class_validator20.IsString)({ message: "Job role must be a string" })
684
+ ], JobBasicInformationDto.prototype, "jobRole", 2);
657
685
  __decorateClass([
658
- (0, import_typeorm3.Column)({ name: "type", type: "varchar", nullable: true })
659
- ], SenseloafLog.prototype, "type", 2);
686
+ (0, import_class_validator20.IsOptional)(),
687
+ (0, import_class_validator20.IsString)({ message: "Note must be a string" })
688
+ ], JobBasicInformationDto.prototype, "note", 2);
660
689
  __decorateClass([
661
- (0, import_typeorm3.Column)({ name: "end_point", type: "varchar" })
662
- ], SenseloafLog.prototype, "endpoint", 2);
690
+ (0, import_class_validator20.IsArray)({ message: "Skills must be an array" }),
691
+ (0, import_class_validator20.ArrayNotEmpty)({ message: "Please select at least one skill" }),
692
+ (0, import_class_validator20.IsNumber)({}, { each: true, message: "Each skill must be a number" }),
693
+ (0, import_class_transformer.Type)(() => Number)
694
+ ], JobBasicInformationDto.prototype, "skills", 2);
663
695
  __decorateClass([
664
- (0, import_typeorm3.Column)({ name: "success", type: "boolean" })
665
- ], SenseloafLog.prototype, "success", 2);
696
+ (0, import_class_validator20.IsNumber)({}, { message: "Openings must be a number" }),
697
+ (0, import_class_validator20.Min)(1, { message: "There must be at least 1 opening" }),
698
+ (0, import_class_transformer.Type)(() => Number)
699
+ ], JobBasicInformationDto.prototype, "openings", 2);
666
700
  __decorateClass([
667
- (0, import_typeorm3.Column)({ name: "request", type: "jsonb", nullable: true })
668
- ], SenseloafLog.prototype, "request", 2);
701
+ (0, import_class_validator20.IsEnum)(JobLocation, {
702
+ message: `Location must be one of: ${Object.values(JobLocation).join(
703
+ ", "
704
+ )}`
705
+ })
706
+ ], JobBasicInformationDto.prototype, "location", 2);
669
707
  __decorateClass([
670
- (0, import_typeorm3.Column)({ name: "response", type: "jsonb", nullable: true })
671
- ], SenseloafLog.prototype, "response", 2);
708
+ (0, import_class_validator20.IsEnum)(EmploymentType, {
709
+ message: `Type of employment must be one of: ${Object.values(
710
+ EmploymentType
711
+ ).join(", ")}`
712
+ })
713
+ ], JobBasicInformationDto.prototype, "typeOfEmployment", 2);
672
714
  __decorateClass([
673
- (0, import_typeorm3.Column)({ name: "error_message", type: "text", nullable: true })
674
- ], SenseloafLog.prototype, "errorMessage", 2);
715
+ (0, import_class_validator20.IsNumber)({}, { message: "Expected salary (from) must be a number" }),
716
+ (0, import_class_validator20.Min)(0, { message: "Expected salary (from) cannot be negative" }),
717
+ (0, import_class_transformer.Type)(() => Number)
718
+ ], JobBasicInformationDto.prototype, "expectedSalaryFrom", 2);
675
719
  __decorateClass([
676
- (0, import_typeorm3.Column)({ name: "scope", type: "varchar", nullable: true })
677
- ], SenseloafLog.prototype, "scope", 2);
720
+ (0, import_class_validator20.IsNumber)({}, { message: "Expected salary (to) must be a number" }),
721
+ (0, import_class_validator20.Min)(0, { message: "Expected salary (to) cannot be negative" }),
722
+ (0, import_class_transformer.Type)(() => Number)
723
+ ], JobBasicInformationDto.prototype, "expectedSalaryTo", 2);
678
724
  __decorateClass([
679
- (0, import_typeorm3.CreateDateColumn)({ name: "created_at", type: "timestamp with time zone" })
680
- ], SenseloafLog.prototype, "createdAt", 2);
725
+ (0, import_class_validator20.IsString)({ message: "Onboarding TAT must be a string" }),
726
+ (0, import_class_validator20.IsOptional)()
727
+ ], JobBasicInformationDto.prototype, "onboardingTat", 2);
681
728
  __decorateClass([
682
- (0, import_typeorm3.ManyToOne)(() => User, (user) => user.senseloafLogs),
683
- (0, import_typeorm3.JoinColumn)({ name: "user_id" })
684
- ], SenseloafLog.prototype, "user", 2);
685
- SenseloafLog = __decorateClass([
686
- (0, import_typeorm3.Entity)("senseloaf_logs")
687
- ], SenseloafLog);
729
+ (0, import_class_validator20.IsString)({ message: "Candidate communication skills must be a string" }),
730
+ (0, import_class_validator20.IsOptional)()
731
+ ], JobBasicInformationDto.prototype, "candidateCommunicationSkills", 2);
688
732
 
689
- // src/entities/otp.entity.ts
690
- var import_typeorm4 = require("typeorm");
691
- var Otp = class {
733
+ // src/modules/job/dto/job-additional-comment.dto.ts
734
+ var import_class_validator21 = require("class-validator");
735
+ var JobAdditionalCommentDto = class {
692
736
  };
693
737
  __decorateClass([
694
- (0, import_typeorm4.PrimaryGeneratedColumn)("increment", { type: "integer" })
695
- ], Otp.prototype, "id", 2);
696
- // individual index to find OTPs by user
697
- __decorateClass([
698
- (0, import_typeorm4.Column)({ name: "user_id", type: "integer", nullable: true }),
699
- (0, import_typeorm4.Index)()
700
- ], Otp.prototype, "userId", 2);
701
- __decorateClass([
702
- (0, import_typeorm4.Column)({ name: "otp", type: "varchar", length: 4 }),
703
- (0, import_typeorm4.Index)()
704
- ], Otp.prototype, "otp", 2);
738
+ (0, import_class_validator21.IsOptional)(),
739
+ (0, import_class_validator21.IsString)({ message: "Additional comment must be a string" }),
740
+ (0, import_class_validator21.MaxLength)(500, { message: "Additional comment must not exceed 500 characters" })
741
+ ], JobAdditionalCommentDto.prototype, "additionalComment", 2);
742
+
743
+ // src/modules/job/dto/job-description.dto.ts
744
+ var import_class_validator22 = require("class-validator");
745
+ var JobDescriptionDto = class {
746
+ };
705
747
  __decorateClass([
706
- (0, import_typeorm4.Column)({ name: "otp_purpose", type: "varchar", length: 50 })
707
- ], Otp.prototype, "otpPurpose", 2);
748
+ (0, import_class_validator22.IsNotEmpty)({ message: "Please enter job description" }),
749
+ (0, import_class_validator22.IsString)({ message: "Description must be a string" }),
750
+ (0, import_class_validator22.MaxLength)(5e3, { message: "Description must not exceed 5000 characters" })
751
+ ], JobDescriptionDto.prototype, "description", 2);
752
+
753
+ // src/modules/job/dto/job-status.dto.ts
754
+ var import_class_validator23 = require("class-validator");
755
+ var JobStatus = /* @__PURE__ */ ((JobStatus2) => {
756
+ JobStatus2["ACTIVE"] = "ACTIVE";
757
+ JobStatus2["OPEN"] = "OPEN";
758
+ JobStatus2["DRAFT"] = "DRAFT";
759
+ JobStatus2["ONHOLD"] = "ONHOLD";
760
+ JobStatus2["CLOSED"] = "CLOSED";
761
+ return JobStatus2;
762
+ })(JobStatus || {});
763
+ var JobStatusDto = class {
764
+ };
708
765
  __decorateClass([
709
- (0, import_typeorm4.Column)({ name: "target", type: "varchar", nullable: true }),
710
- (0, import_typeorm4.Index)()
711
- ], Otp.prototype, "target", 2);
712
- // support expiration checks
713
- __decorateClass([
714
- (0, import_typeorm4.Column)({ name: "expire_at", type: "timestamp" }),
715
- (0, import_typeorm4.Index)()
716
- ], Otp.prototype, "expiresAt", 2);
717
- __decorateClass([
718
- (0, import_typeorm4.Column)({ name: "is_used", type: "boolean", default: false }),
719
- (0, import_typeorm4.Index)()
720
- ], Otp.prototype, "isUsed", 2);
766
+ (0, import_class_validator23.IsNotEmpty)({ message: "Please provide a job status" }),
767
+ (0, import_class_validator23.IsEnum)(JobStatus, {
768
+ message: `Status must be one of: ${Object.values(JobStatus).join(", ")}`
769
+ })
770
+ ], JobStatusDto.prototype, "status", 2);
771
+
772
+ // src/modules/job/dto/job-id-param.dto.ts
773
+ var import_class_validator24 = require("class-validator");
774
+ var JobIdParamDto = class {
775
+ };
721
776
  __decorateClass([
722
- (0, import_typeorm4.Column)({ name: "resend_count", type: "int", default: 0 })
723
- ], Otp.prototype, "resendCount", 2);
777
+ (0, import_class_validator24.IsUUID)("4", {
778
+ message: "Invalid job ID. It must be a valid UUID version 4."
779
+ })
780
+ ], JobIdParamDto.prototype, "id", 2);
781
+
782
+ // src/modules/user/freelancer-profile/pattern/pattern.ts
783
+ var PROFILE_PATTERN = {
784
+ fetchFreelancerProfile: "fetch.freelancer.profile",
785
+ changeFreelancerPassword: "change.freelancer.password",
786
+ uploadFreelancerProfilePic: "upload.freelancer.profilepic",
787
+ updateFreelancerProfile: "update.freelancer.profile"
788
+ };
789
+
790
+ // src/modules/user/freelancer-profile/dto/freelancer-change-password.dto.ts
791
+ var import_class_validator25 = require("class-validator");
792
+ var FreelancerChangePasswordDto = class {
793
+ };
724
794
  __decorateClass([
725
- (0, import_typeorm4.CreateDateColumn)({ name: "created_at", type: "timestamp with time zone" })
726
- ], Otp.prototype, "createdAt", 2);
795
+ (0, import_class_validator25.IsNotEmpty)({ message: "Please enter Old Password." }),
796
+ (0, import_class_validator25.IsString)()
797
+ ], FreelancerChangePasswordDto.prototype, "oldPassword", 2);
727
798
  __decorateClass([
728
- (0, import_typeorm4.ManyToOne)(() => User, (user) => user.otps),
729
- (0, import_typeorm4.JoinColumn)({ name: "user_id" })
730
- ], Otp.prototype, "user", 2);
731
- Otp = __decorateClass([
732
- (0, import_typeorm4.Entity)("otps"),
733
- (0, import_typeorm4.Index)(["userId", "otp", "otpPurpose", "isUsed"])
734
- ], Otp);
799
+ (0, import_class_validator25.IsNotEmpty)({ message: "Please enter New Password." }),
800
+ (0, import_class_validator25.IsString)(),
801
+ (0, import_class_validator25.MinLength)(6),
802
+ (0, import_class_validator25.MaxLength)(32),
803
+ (0, import_class_validator25.Matches)(/^(?=.*[A-Za-z])(?=.*\d)(?=.*[@$!%*?&])/, {
804
+ message: "New Password must include letters, numbers and symbols."
805
+ })
806
+ ], FreelancerChangePasswordDto.prototype, "newPassword", 2);
735
807
 
736
- // src/entities/freelancer-profile.entity.ts
737
- var import_typeorm5 = require("typeorm");
738
- var NatureOfWork = /* @__PURE__ */ ((NatureOfWork2) => {
739
- NatureOfWork2["FULLTIME"] = "FULLTIME";
740
- NatureOfWork2["PARTTIME"] = "PARTTIME";
741
- NatureOfWork2["BOTH"] = "BOTH";
742
- return NatureOfWork2;
743
- })(NatureOfWork || {});
744
- var ModeOfWork = /* @__PURE__ */ ((ModeOfWork2) => {
745
- ModeOfWork2["ONSITE"] = "ONSITE";
746
- ModeOfWork2["REMOTE"] = "REMOTE";
747
- ModeOfWork2["BOTH"] = "BOTH";
748
- return ModeOfWork2;
749
- })(ModeOfWork || {});
750
- var OnboardingStepEnum = /* @__PURE__ */ ((OnboardingStepEnum2) => {
751
- OnboardingStepEnum2["SIGN_UP"] = "SIGN_UP";
752
- OnboardingStepEnum2["OTP_VERIFIED"] = "OTP_VERIFIED";
753
- OnboardingStepEnum2["UPLOAD_RESUME"] = "UPLOAD_RESUME";
754
- OnboardingStepEnum2["AI_VIDEO_ASSESMENT"] = "AI_VIDEO_ASSESMENT";
755
- OnboardingStepEnum2["CODING_CHALLENGE"] = "CODING_CHALLENGE";
756
- OnboardingStepEnum2["PROFILE_COMPLETION"] = "PROFILE_COMPLETION";
757
- return OnboardingStepEnum2;
758
- })(OnboardingStepEnum || {});
759
- var FreelancerProfile = class extends BaseEntity {
808
+ // src/modules/user/freelancer-profile/dto/update-freelancer-profile.dto.ts
809
+ var import_class_validator26 = require("class-validator");
810
+ var NatureOfWorkDto = /* @__PURE__ */ ((NatureOfWorkDto2) => {
811
+ NatureOfWorkDto2["FULLTIME"] = "FULLTIME";
812
+ NatureOfWorkDto2["PARTTIME"] = "PARTTIME";
813
+ NatureOfWorkDto2["BOTH"] = "BOTH";
814
+ return NatureOfWorkDto2;
815
+ })(NatureOfWorkDto || {});
816
+ var UpdateFreelancerProfileDto = class {
760
817
  };
761
- // individual index to find profile by user
762
- __decorateClass([
763
- (0, import_typeorm5.Column)({ name: "user_id", type: "integer", nullable: true }),
764
- (0, import_typeorm5.Index)()
765
- ], FreelancerProfile.prototype, "userId", 2);
766
818
  __decorateClass([
767
- (0, import_typeorm5.ManyToOne)(() => User, (user) => user.freelancerProfile),
768
- (0, import_typeorm5.JoinColumn)({ name: "user_id" })
769
- ], FreelancerProfile.prototype, "user", 2);
819
+ (0, import_class_validator26.IsOptional)(),
820
+ (0, import_class_validator26.IsString)()
821
+ ], UpdateFreelancerProfileDto.prototype, "firstName", 2);
770
822
  __decorateClass([
771
- (0, import_typeorm5.Column)({ name: "resume_url", type: "text", nullable: true })
772
- ], FreelancerProfile.prototype, "resumeUrl", 2);
823
+ (0, import_class_validator26.IsOptional)(),
824
+ (0, import_class_validator26.IsString)()
825
+ ], UpdateFreelancerProfileDto.prototype, "lastName", 2);
773
826
  __decorateClass([
774
- (0, import_typeorm5.Column)({ name: "resume_data", type: "jsonb", nullable: true })
775
- ], FreelancerProfile.prototype, "resumeData", 2);
827
+ (0, import_class_validator26.IsOptional)(),
828
+ (0, import_class_validator26.IsEmail)()
829
+ ], UpdateFreelancerProfileDto.prototype, "email", 2);
776
830
  __decorateClass([
777
- (0, import_typeorm5.Column)({ name: "is_developer", type: "boolean", default: false })
778
- ], FreelancerProfile.prototype, "isDeveloper", 2);
831
+ (0, import_class_validator26.IsOptional)(),
832
+ (0, import_class_validator26.IsString)()
833
+ ], UpdateFreelancerProfileDto.prototype, "mobile", 2);
779
834
  __decorateClass([
780
- (0, import_typeorm5.Column)({
781
- name: "nature_of_work",
782
- type: "enum",
783
- enum: NatureOfWork,
784
- nullable: true
785
- })
786
- ], FreelancerProfile.prototype, "natureOfWork", 2);
835
+ (0, import_class_validator26.IsOptional)(),
836
+ (0, import_class_validator26.IsNumber)()
837
+ ], UpdateFreelancerProfileDto.prototype, "countryId", 2);
787
838
  __decorateClass([
788
- (0, import_typeorm5.Column)({ name: "currency", type: "varchar", default: "USD" })
789
- ], FreelancerProfile.prototype, "currency", 2);
839
+ (0, import_class_validator26.IsOptional)(),
840
+ (0, import_class_validator26.IsString)()
841
+ ], UpdateFreelancerProfileDto.prototype, "currency", 2);
790
842
  __decorateClass([
791
- (0, import_typeorm5.Column)({
792
- name: "expected_hourly_compensation",
793
- type: "numeric",
794
- precision: 10,
795
- scale: 2,
796
- nullable: true
797
- })
798
- ], FreelancerProfile.prototype, "expectedHourlyCompensation", 2);
843
+ (0, import_class_validator26.IsOptional)(),
844
+ (0, import_class_validator26.IsString)()
845
+ ], UpdateFreelancerProfileDto.prototype, "expectedHourlyCompensation", 2);
799
846
  __decorateClass([
800
- (0, import_typeorm5.Column)({
801
- name: "mode_of_work",
802
- type: "enum",
803
- enum: ModeOfWork,
804
- nullable: true
847
+ (0, import_class_validator26.IsOptional)(),
848
+ (0, import_class_validator26.IsEnum)(NatureOfWorkDto, {
849
+ message: `Engagement Type must be one of: ${Object.values(NatureOfWorkDto).join(", ")}`
805
850
  })
806
- ], FreelancerProfile.prototype, "modeOfWork", 2);
807
- __decorateClass([
808
- (0, import_typeorm5.Column)({ name: "availability_to_join", type: "varchar", nullable: true })
809
- ], FreelancerProfile.prototype, "availabilityToJoin", 2);
810
- __decorateClass([
811
- (0, import_typeorm5.Column)({ name: "is_immediate_joiner", type: "boolean", nullable: true })
812
- ], FreelancerProfile.prototype, "isImmediateJoiner", 2);
813
- __decorateClass([
814
- (0, import_typeorm5.Column)({ name: "linkedin_profile_link", type: "varchar", nullable: true })
815
- ], FreelancerProfile.prototype, "linkedinProfileLink", 2);
816
- __decorateClass([
817
- (0, import_typeorm5.Column)({ name: "kaggle_profile_link", type: "varchar", nullable: true })
818
- ], FreelancerProfile.prototype, "kaggleProfileLink", 2);
851
+ ], UpdateFreelancerProfileDto.prototype, "natureOfWork", 2);
819
852
  __decorateClass([
820
- (0, import_typeorm5.Column)({ name: "github_profile_link", type: "varchar", nullable: true })
821
- ], FreelancerProfile.prototype, "githubProfileLink", 2);
853
+ (0, import_class_validator26.IsOptional)(),
854
+ (0, import_class_validator26.IsString)()
855
+ ], UpdateFreelancerProfileDto.prototype, "portfolioLink", 2);
822
856
  __decorateClass([
823
- (0, import_typeorm5.Column)({
824
- name: "stack_overflow_profile_link",
825
- type: "varchar",
826
- nullable: true
827
- })
828
- ], FreelancerProfile.prototype, "stackOverflowProfileLink", 2);
857
+ (0, import_class_validator26.IsOptional)(),
858
+ (0, import_class_validator26.IsString)()
859
+ ], UpdateFreelancerProfileDto.prototype, "address", 2);
829
860
  __decorateClass([
830
- (0, import_typeorm5.Column)({ name: "portfolio_link", type: "varchar", nullable: true })
831
- ], FreelancerProfile.prototype, "portfolioLink", 2);
861
+ (0, import_class_validator26.IsOptional)(),
862
+ (0, import_class_validator26.IsString)()
863
+ ], UpdateFreelancerProfileDto.prototype, "about", 2);
832
864
  __decorateClass([
833
- (0, import_typeorm5.Column)({
834
- name: "onboarding_step_completed",
835
- type: "enum",
836
- enum: OnboardingStepEnum,
837
- nullable: true
838
- })
839
- ], FreelancerProfile.prototype, "onboardingStepCompleted", 2);
865
+ (0, import_class_validator26.IsOptional)(),
866
+ (0, import_class_validator26.IsString)()
867
+ ], UpdateFreelancerProfileDto.prototype, "linkedinProfileLink", 2);
840
868
  __decorateClass([
841
- (0, import_typeorm5.Column)({ name: "country_id", type: "integer", nullable: true })
842
- ], FreelancerProfile.prototype, "countryId", 2);
869
+ (0, import_class_validator26.IsOptional)(),
870
+ (0, import_class_validator26.IsString)()
871
+ ], UpdateFreelancerProfileDto.prototype, "kaggleProfileLink", 2);
843
872
  __decorateClass([
844
- (0, import_typeorm5.Column)({ name: "address", type: "varchar", nullable: true })
845
- ], FreelancerProfile.prototype, "address", 2);
873
+ (0, import_class_validator26.IsOptional)(),
874
+ (0, import_class_validator26.IsString)()
875
+ ], UpdateFreelancerProfileDto.prototype, "githubProfileLink", 2);
846
876
  __decorateClass([
847
- (0, import_typeorm5.Column)({ name: "about", type: "varchar", nullable: true })
848
- ], FreelancerProfile.prototype, "about", 2);
849
- FreelancerProfile = __decorateClass([
850
- (0, import_typeorm5.Entity)("freelancer_profiles")
851
- ], FreelancerProfile);
852
-
853
- // src/entities/job.entity.ts
854
- var import_typeorm9 = require("typeorm");
877
+ (0, import_class_validator26.IsOptional)(),
878
+ (0, import_class_validator26.IsString)()
879
+ ], UpdateFreelancerProfileDto.prototype, "stackOverflowProfileLink", 2);
855
880
 
856
- // src/entities/job-skill.entity.ts
857
- var import_typeorm7 = require("typeorm");
881
+ // src/modules/bank/pattern/pattern.ts
882
+ var BANK_PATTERN = {
883
+ addFreelancerBankDetails: "add.freelancer.bankdetails",
884
+ fetchFreelancerBankDetails: "fetch.freelancer.bank.details",
885
+ updateFreelancerBankDetails: "update.freelancer.bank.details"
886
+ };
858
887
 
859
- // src/entities/skill.entity.ts
860
- var import_typeorm6 = require("typeorm");
861
- var Skill = class extends BaseEntity {
888
+ // src/modules/bank/dto/freelancer-bank-details.dto.ts
889
+ var import_class_validator27 = require("class-validator");
890
+ var BankAccountScope = /* @__PURE__ */ ((BankAccountScope2) => {
891
+ BankAccountScope2["DOMESTIC"] = "DOMESTIC";
892
+ BankAccountScope2["INTERNATIONAL"] = "INTERNATIONAL";
893
+ return BankAccountScope2;
894
+ })(BankAccountScope || {});
895
+ var FreelancerBankDetailsDto = class {
862
896
  };
863
897
  __decorateClass([
864
- (0, import_typeorm6.Column)({ name: "name", type: "varchar", nullable: true })
865
- ], Skill.prototype, "name", 2);
898
+ (0, import_class_validator27.IsNotEmpty)({ message: "Please enter Account Holder Name." })
899
+ ], FreelancerBankDetailsDto.prototype, "name", 2);
866
900
  __decorateClass([
867
- (0, import_typeorm6.Column)({ name: "slug", type: "varchar", nullable: true, unique: true })
868
- ], Skill.prototype, "slug", 2);
901
+ (0, import_class_validator27.IsNotEmpty)({ message: "Please enter Mobile Number." })
902
+ ], FreelancerBankDetailsDto.prototype, "mobile", 2);
869
903
  __decorateClass([
870
- (0, import_typeorm6.Column)({ name: "is_active", type: "boolean", default: false })
871
- ], Skill.prototype, "isActive", 2);
904
+ (0, import_class_validator27.IsNotEmpty)({ message: "Please enter Email." })
905
+ ], FreelancerBankDetailsDto.prototype, "email", 2);
872
906
  __decorateClass([
873
- (0, import_typeorm6.OneToMany)(() => JobSkill, (jobSkill) => jobSkill.skill)
874
- ], Skill.prototype, "jobSkills", 2);
875
- Skill = __decorateClass([
876
- (0, import_typeorm6.Entity)("skills")
877
- ], Skill);
878
-
879
- // src/entities/job-skill.entity.ts
880
- var JobSkill = class extends BaseEntity {
881
- };
907
+ (0, import_class_validator27.IsOptional)()
908
+ ], FreelancerBankDetailsDto.prototype, "address", 2);
882
909
  __decorateClass([
883
- (0, import_typeorm7.Column)({ name: "job_id", type: "integer" }),
884
- (0, import_typeorm7.Index)()
885
- ], JobSkill.prototype, "jobId", 2);
886
- __decorateClass([
887
- (0, import_typeorm7.ManyToOne)(() => Job, (job) => job.jobSkills, { onDelete: "CASCADE" }),
888
- (0, import_typeorm7.JoinColumn)({ name: "job_id" })
889
- ], JobSkill.prototype, "job", 2);
910
+ (0, import_class_validator27.IsNotEmpty)({ message: "Please enter Account Number." })
911
+ ], FreelancerBankDetailsDto.prototype, "accountNumber", 2);
890
912
  __decorateClass([
891
- (0, import_typeorm7.Column)({ name: "skill_id", type: "integer" }),
892
- (0, import_typeorm7.Index)()
893
- ], JobSkill.prototype, "skillId", 2);
913
+ (0, import_class_validator27.IsNotEmpty)({ message: "Please enter Bank Name." })
914
+ ], FreelancerBankDetailsDto.prototype, "bankName", 2);
894
915
  __decorateClass([
895
- (0, import_typeorm7.ManyToOne)(() => Skill, (skill) => skill.jobSkills, { onDelete: "CASCADE" }),
896
- (0, import_typeorm7.JoinColumn)({ name: "skill_id" })
897
- ], JobSkill.prototype, "skill", 2);
898
- JobSkill = __decorateClass([
899
- (0, import_typeorm7.Entity)("job_skills")
900
- ], JobSkill);
901
-
902
- // src/entities/job-application.entity.ts
903
- var import_typeorm8 = require("typeorm");
904
- var ApplicationStatusEnum = /* @__PURE__ */ ((ApplicationStatusEnum2) => {
905
- ApplicationStatusEnum2["PENDING"] = "PENDING";
906
- ApplicationStatusEnum2["SHORTLISTED"] = "SHORTLISTED";
907
- ApplicationStatusEnum2["INTERVIEW_IN_PROGRESS"] = "INTERVIEW_IN_PROGRESS";
908
- ApplicationStatusEnum2["INTERVIEWED"] = "INTERVIEWED";
909
- ApplicationStatusEnum2["OFFERED"] = "OFFERED";
910
- ApplicationStatusEnum2["HIRED"] = "HIRED";
911
- ApplicationStatusEnum2["REJECTED_BEFORE_INTERVIEW"] = "REJECTED_BEFORE_INTERVIEW";
912
- ApplicationStatusEnum2["REJECTED_IN_INTERVIEW"] = "REJECTED_IN_INTERVIEW";
913
- ApplicationStatusEnum2["REJECTED_AFTER_INTERVIEW"] = "REJECTED_AFTER_INTERVIEW";
914
- ApplicationStatusEnum2["NOT_SUITABLE"] = "NOT_SUITABLE";
915
- ApplicationStatusEnum2["WITHDRAWN"] = "WITHDRAWN";
916
- return ApplicationStatusEnum2;
917
- })(ApplicationStatusEnum || {});
918
- var JobApplication = class extends BaseEntity {
919
- };
916
+ (0, import_class_validator27.IsNotEmpty)({ message: "Please enter Branch Name." })
917
+ ], FreelancerBankDetailsDto.prototype, "branchName", 2);
920
918
  __decorateClass([
921
- (0, import_typeorm8.Column)({
922
- name: "job_application_id",
923
- type: "varchar",
924
- unique: true,
925
- nullable: true
926
- })
927
- ], JobApplication.prototype, "jobApplicationId", 2);
919
+ (0, import_class_validator27.ValidateIf)((dto) => dto.accountScope === "DOMESTIC"),
920
+ (0, import_class_validator27.IsNotEmpty)({ message: "IFSC Code is required for DOMESTIC accounts." })
921
+ ], FreelancerBankDetailsDto.prototype, "ifscCode", 2);
928
922
  __decorateClass([
929
- (0, import_typeorm8.Column)({ name: "job_id", type: "integer" }),
930
- (0, import_typeorm8.Index)()
931
- ], JobApplication.prototype, "jobId", 2);
923
+ (0, import_class_validator27.ValidateIf)((dto) => dto.accountScope === "INTERNATIONAL"),
924
+ (0, import_class_validator27.IsNotEmpty)({ message: "Routing Number/Sort Code is required for INTERNATIONAL accounts." })
925
+ ], FreelancerBankDetailsDto.prototype, "routingNo", 2);
932
926
  __decorateClass([
933
- (0, import_typeorm8.ManyToOne)(() => Job, (job) => job.jobApplications, { onDelete: "CASCADE" }),
934
- (0, import_typeorm8.JoinColumn)({ name: "job_id" })
935
- ], JobApplication.prototype, "job", 2);
927
+ (0, import_class_validator27.ValidateIf)((dto) => dto.accountScope === "INTERNATIONAL"),
928
+ (0, import_class_validator27.IsNotEmpty)({ message: "ABA Number is required for INTERNATIONAL accounts." })
929
+ ], FreelancerBankDetailsDto.prototype, "abaNumber", 2);
936
930
  __decorateClass([
937
- (0, import_typeorm8.Column)({ name: "user_id", type: "integer" }),
938
- (0, import_typeorm8.Index)()
939
- ], JobApplication.prototype, "userId", 2);
931
+ (0, import_class_validator27.ValidateIf)((dto) => dto.accountScope === "INTERNATIONAL"),
932
+ (0, import_class_validator27.IsNotEmpty)({ message: "IBAN is required for INTERNATIONAL accounts." })
933
+ ], FreelancerBankDetailsDto.prototype, "iban", 2);
940
934
  __decorateClass([
941
- (0, import_typeorm8.ManyToOne)(() => User, (user) => user.jobApplications),
942
- (0, import_typeorm8.JoinColumn)({ name: "user_id" })
943
- ], JobApplication.prototype, "user", 2);
935
+ (0, import_class_validator27.IsOptional)()
936
+ ], FreelancerBankDetailsDto.prototype, "accountType", 2);
944
937
  __decorateClass([
945
- (0, import_typeorm8.Column)({
946
- name: "status",
947
- type: "enum",
948
- enum: ApplicationStatusEnum,
949
- default: "PENDING" /* PENDING */
938
+ (0, import_class_validator27.IsEnum)(BankAccountScope, {
939
+ message: `Type of Account Scope must be one of: ${Object.values(
940
+ BankAccountScope
941
+ ).join(", ")}`
950
942
  })
951
- ], JobApplication.prototype, "status", 2);
943
+ ], FreelancerBankDetailsDto.prototype, "accountScope", 2);
944
+
945
+ // src/modules/plan/pattern/pattern.ts
946
+ var PLAN_PATTERN = {
947
+ fetchPlans: "fetch.plans"
948
+ };
949
+
950
+ // src/modules/system-preference/pattern/pattern.ts
951
+ var SYSTEM_PREFERENCES_PATTERN = {
952
+ fetchSystemPreference: "fetch.system.preferences",
953
+ updateSystemPreference: "update.system.preferences",
954
+ createSystemPreference: "create.system.preferences"
955
+ };
956
+
957
+ // src/modules/system-preference/dto/system-preference.dto.ts
958
+ var import_class_validator28 = require("class-validator");
959
+ var SystemPreferenceKey = /* @__PURE__ */ ((SystemPreferenceKey2) => {
960
+ SystemPreferenceKey2["EMAIL_NOTIFICATION"] = "EMAIL_NOTIFICATION";
961
+ SystemPreferenceKey2["DARK_MODE"] = "DARK_MODE";
962
+ return SystemPreferenceKey2;
963
+ })(SystemPreferenceKey || {});
964
+ var SystemPreferenceDto = class {
965
+ };
952
966
  __decorateClass([
953
- (0, import_typeorm8.Column)({
954
- name: "applied_at",
955
- type: "timestamp with time zone",
956
- default: () => "CURRENT_TIMESTAMP"
957
- })
958
- ], JobApplication.prototype, "appliedAt", 2);
967
+ (0, import_class_validator28.IsBoolean)()
968
+ ], SystemPreferenceDto.prototype, "value", 2);
959
969
  __decorateClass([
960
- (0, import_typeorm8.Column)({
961
- name: "shortlisted_at",
962
- type: "timestamp with time zone",
963
- nullable: true
970
+ (0, import_class_validator28.IsEnum)(SystemPreferenceKey, {
971
+ message: `key must be one of: ${Object.values(
972
+ SystemPreferenceKey
973
+ ).join(", ")}`
964
974
  })
965
- ], JobApplication.prototype, "shortlistedAt", 2);
975
+ ], SystemPreferenceDto.prototype, "key", 2);
976
+
977
+ // src/modules/notification/pattern/pattern.ts
978
+ var NOTIFICATION_PATTERN = {
979
+ handleAccountVerificationNotification: "handle.account.verification.notification",
980
+ handleResetLinkNotification: "handle.reset.link.notification"
981
+ };
982
+
983
+ // src/modules/rating/pattern/pattern.ts
984
+ var RATING_PATTERN = {
985
+ addRating: "add.rating",
986
+ fetchRating: "fetch.rating"
987
+ };
988
+
989
+ // src/modules/rating/dto/add.rating.dto.ts
990
+ var import_class_validator29 = require("class-validator");
991
+
992
+ // src/entities/rating.entity.ts
993
+ var import_typeorm16 = require("typeorm");
994
+
995
+ // src/entities/user.entity.ts
996
+ var import_typeorm15 = require("typeorm");
997
+
998
+ // src/entities/base.entity.ts
999
+ var import_typeorm = require("typeorm");
1000
+ var BaseEntity = class {
1001
+ };
966
1002
  __decorateClass([
967
- (0, import_typeorm8.Column)({
968
- name: "interview_started_at",
969
- type: "timestamp with time zone",
970
- nullable: true
971
- })
972
- ], JobApplication.prototype, "interviewStartedAt", 2);
1003
+ (0, import_typeorm.PrimaryGeneratedColumn)("increment", { type: "integer" })
1004
+ ], BaseEntity.prototype, "id", 2);
973
1005
  __decorateClass([
974
- (0, import_typeorm8.Column)({
975
- name: "interview_completed_at",
976
- type: "timestamp with time zone",
977
- nullable: true
978
- })
979
- ], JobApplication.prototype, "interviewCompletedAt", 2);
1006
+ (0, import_typeorm.Column)({ type: "uuid" }),
1007
+ (0, import_typeorm.Generated)("uuid")
1008
+ ], BaseEntity.prototype, "uuid", 2);
980
1009
  __decorateClass([
981
- (0, import_typeorm8.Column)({
982
- name: "offered_at",
983
- type: "timestamp with time zone",
984
- nullable: true
985
- })
986
- ], JobApplication.prototype, "offeredAt", 2);
1010
+ (0, import_typeorm.CreateDateColumn)({ name: "created_at", type: "timestamp with time zone" })
1011
+ ], BaseEntity.prototype, "createdAt", 2);
987
1012
  __decorateClass([
988
- (0, import_typeorm8.Column)({
989
- name: "hired_at",
990
- type: "timestamp with time zone",
991
- nullable: true
992
- })
993
- ], JobApplication.prototype, "hiredAt", 2);
1013
+ (0, import_typeorm.Column)({ name: "created_by", type: "integer", nullable: true })
1014
+ ], BaseEntity.prototype, "createdBy", 2);
994
1015
  __decorateClass([
995
- (0, import_typeorm8.Column)({
996
- name: "rejected_at",
997
- type: "timestamp with time zone",
998
- nullable: true
999
- })
1000
- ], JobApplication.prototype, "rejectedAt", 2);
1016
+ (0, import_typeorm.UpdateDateColumn)({ name: "updated_at", type: "timestamp with time zone" })
1017
+ ], BaseEntity.prototype, "updatedAt", 2);
1001
1018
  __decorateClass([
1002
- (0, import_typeorm8.Column)({ name: "rejection_reason", type: "varchar", nullable: true })
1003
- ], JobApplication.prototype, "rejectionReason", 2);
1019
+ (0, import_typeorm.Column)({ name: "updated_by", type: "integer", nullable: true })
1020
+ ], BaseEntity.prototype, "updatedBy", 2);
1004
1021
  __decorateClass([
1005
- (0, import_typeorm8.Column)({
1006
- name: "withdrawn_at",
1022
+ (0, import_typeorm.Column)({ name: "is_deleted", type: "boolean", default: false })
1023
+ ], BaseEntity.prototype, "isDeleted", 2);
1024
+ __decorateClass([
1025
+ (0, import_typeorm.Column)({ name: "deleted_by", type: "integer", nullable: true })
1026
+ ], BaseEntity.prototype, "deletedBy", 2);
1027
+ __decorateClass([
1028
+ (0, import_typeorm.DeleteDateColumn)({
1029
+ name: "deleted_at",
1007
1030
  type: "timestamp with time zone",
1008
1031
  nullable: true
1009
1032
  })
1010
- ], JobApplication.prototype, "withdrawnAt", 2);
1011
- __decorateClass([
1012
- (0, import_typeorm8.Column)({ name: "withdrawn_reason", type: "varchar", nullable: true })
1013
- ], JobApplication.prototype, "withdrawnReason", 2);
1014
- JobApplication = __decorateClass([
1015
- (0, import_typeorm8.Entity)("job_applications")
1016
- ], JobApplication);
1033
+ ], BaseEntity.prototype, "deletedAt", 2);
1017
1034
 
1018
- // src/entities/job.entity.ts
1019
- var JobLocationEnum = /* @__PURE__ */ ((JobLocationEnum2) => {
1020
- JobLocationEnum2["ONSITE"] = "ONSITE";
1021
- JobLocationEnum2["REMOTE"] = "REMOTE";
1022
- JobLocationEnum2["BOTH"] = "BOTH";
1023
- return JobLocationEnum2;
1024
- })(JobLocationEnum || {});
1025
- var TypeOfEmploymentEnum = /* @__PURE__ */ ((TypeOfEmploymentEnum2) => {
1026
- TypeOfEmploymentEnum2["FULLTIME"] = "FULLTIME";
1027
- TypeOfEmploymentEnum2["PARTTIME"] = "PARTTIME";
1028
- TypeOfEmploymentEnum2["BOTH"] = "BOTH";
1029
- return TypeOfEmploymentEnum2;
1030
- })(TypeOfEmploymentEnum || {});
1031
- var Step = /* @__PURE__ */ ((Step2) => {
1032
- Step2["BASIC_INFORMATION"] = "BASIC_INFORMATION";
1033
- Step2["ADDITIONAL_COMMENTS"] = "ADDITIONAL_COMMENTS";
1034
- Step2["JOB_DESCRIPTION"] = "JOB_DESCRIPTION";
1035
- return Step2;
1036
- })(Step || {});
1037
- var JobStatusEnum = /* @__PURE__ */ ((JobStatusEnum2) => {
1038
- JobStatusEnum2["ACTIVE"] = "ACTIVE";
1039
- JobStatusEnum2["OPEN"] = "OPEN";
1040
- JobStatusEnum2["DRAFT"] = "DRAFT";
1041
- JobStatusEnum2["ONHOLD"] = "ONHOLD";
1042
- JobStatusEnum2["CLOSED"] = "CLOSED";
1043
- return JobStatusEnum2;
1044
- })(JobStatusEnum || {});
1045
- var DurationTypeEnum = /* @__PURE__ */ ((DurationTypeEnum2) => {
1046
- DurationTypeEnum2["DAY"] = "DAY";
1047
- DurationTypeEnum2["WEEK"] = "WEEK";
1048
- DurationTypeEnum2["MONTH"] = "MONTH";
1049
- DurationTypeEnum2["YEAR"] = "YEAR";
1050
- return DurationTypeEnum2;
1051
- })(DurationTypeEnum || {});
1052
- var Job = class extends BaseEntity {
1035
+ // src/entities/refresh-token.entity.ts
1036
+ var import_typeorm2 = require("typeorm");
1037
+ var RefreshToken = class {
1053
1038
  };
1054
1039
  __decorateClass([
1055
- (0, import_typeorm9.Column)({ name: "job_id", type: "varchar", unique: true, nullable: true })
1056
- ], Job.prototype, "jobId", 2);
1057
- // individual index to find jobs by user
1040
+ (0, import_typeorm2.PrimaryGeneratedColumn)("uuid")
1041
+ ], RefreshToken.prototype, "id", 2);
1058
1042
  __decorateClass([
1059
- (0, import_typeorm9.Column)({ name: "user_id", type: "integer", nullable: true }),
1060
- (0, import_typeorm9.Index)()
1061
- ], Job.prototype, "userId", 2);
1043
+ (0, import_typeorm2.Column)({ name: "user_id", type: "integer" })
1044
+ ], RefreshToken.prototype, "userId", 2);
1062
1045
  __decorateClass([
1063
- (0, import_typeorm9.ManyToOne)(() => User, (user) => user.jobs),
1064
- (0, import_typeorm9.JoinColumn)({ name: "user_id" })
1065
- ], Job.prototype, "user", 2);
1046
+ (0, import_typeorm2.Column)({ name: "token_id", type: "varchar" })
1047
+ ], RefreshToken.prototype, "tokenId", 2);
1066
1048
  __decorateClass([
1067
- (0, import_typeorm9.Column)({ name: "job_role", type: "varchar", nullable: true })
1068
- ], Job.prototype, "jobRole", 2);
1049
+ (0, import_typeorm2.Column)({ name: "device_info", type: "json", nullable: true })
1050
+ ], RefreshToken.prototype, "deviceInfo", 2);
1069
1051
  __decorateClass([
1070
- (0, import_typeorm9.Column)({ name: "note", type: "varchar", nullable: true })
1071
- ], Job.prototype, "note", 2);
1052
+ (0, import_typeorm2.Column)({ name: "is_revoked", type: "boolean", default: false })
1053
+ ], RefreshToken.prototype, "isRevoked", 2);
1072
1054
  __decorateClass([
1073
- (0, import_typeorm9.Column)({ name: "openings", type: "integer", default: 0 })
1074
- ], Job.prototype, "openings", 2);
1055
+ (0, import_typeorm2.Column)({ name: "expires_at", type: "timestamp with time zone" })
1056
+ ], RefreshToken.prototype, "expiresAt", 2);
1075
1057
  __decorateClass([
1076
- (0, import_typeorm9.Column)({
1077
- name: "location",
1078
- type: "enum",
1079
- enum: JobLocationEnum,
1080
- nullable: true
1081
- })
1082
- ], Job.prototype, "location", 2);
1058
+ (0, import_typeorm2.CreateDateColumn)({ name: "created_at", type: "timestamp with time zone" })
1059
+ ], RefreshToken.prototype, "createdAt", 2);
1083
1060
  __decorateClass([
1084
- (0, import_typeorm9.Column)({
1085
- name: "type_of_employment",
1086
- type: "enum",
1087
- enum: TypeOfEmploymentEnum,
1088
- nullable: true
1089
- })
1090
- ], Job.prototype, "typeOfEmployment", 2);
1091
- __decorateClass([
1092
- (0, import_typeorm9.Column)({ name: "currency", type: "varchar", default: "USD" })
1093
- ], Job.prototype, "currency", 2);
1094
- __decorateClass([
1095
- (0, import_typeorm9.Column)({
1096
- name: "expected_salary_from",
1097
- type: "decimal",
1098
- precision: 10,
1099
- scale: 2,
1100
- default: 0
1101
- })
1102
- ], Job.prototype, "expectedSalaryFrom", 2);
1061
+ (0, import_typeorm2.UpdateDateColumn)({ name: "updated_at", type: "timestamp with time zone" })
1062
+ ], RefreshToken.prototype, "updatedAt", 2);
1103
1063
  __decorateClass([
1104
- (0, import_typeorm9.Column)({
1105
- name: "expected_salary_to",
1106
- type: "decimal",
1107
- precision: 10,
1108
- scale: 2,
1109
- default: 0
1110
- })
1111
- ], Job.prototype, "expectedSalaryTo", 2);
1064
+ (0, import_typeorm2.ManyToOne)(() => User, (user) => user.refreshTokens),
1065
+ (0, import_typeorm2.JoinColumn)({ name: "user_id" })
1066
+ ], RefreshToken.prototype, "user", 2);
1067
+ RefreshToken = __decorateClass([
1068
+ (0, import_typeorm2.Entity)("refresh_tokens")
1069
+ ], RefreshToken);
1070
+
1071
+ // src/entities/senseloaf-log.entity.ts
1072
+ var import_typeorm3 = require("typeorm");
1073
+ var SenseloafLog = class {
1074
+ };
1112
1075
  __decorateClass([
1113
- (0, import_typeorm9.Column)({ name: "tentative_start_date", type: "date", nullable: true })
1114
- ], Job.prototype, "tentativeStartDate", 2);
1076
+ (0, import_typeorm3.PrimaryGeneratedColumn)("increment", { type: "integer" })
1077
+ ], SenseloafLog.prototype, "id", 2);
1115
1078
  __decorateClass([
1116
- (0, import_typeorm9.Column)({ name: "duration", type: "varchar", nullable: true })
1117
- ], Job.prototype, "duration", 2);
1079
+ (0, import_typeorm3.Column)({ name: "user_id", type: "integer", nullable: true })
1080
+ ], SenseloafLog.prototype, "userId", 2);
1118
1081
  __decorateClass([
1119
- (0, import_typeorm9.Column)({
1120
- name: "duration_type",
1121
- type: "enum",
1122
- enum: DurationTypeEnum,
1123
- nullable: true
1124
- })
1125
- ], Job.prototype, "durationType", 2);
1082
+ (0, import_typeorm3.Column)({ name: "type", type: "varchar", nullable: true })
1083
+ ], SenseloafLog.prototype, "type", 2);
1126
1084
  __decorateClass([
1127
- (0, import_typeorm9.Column)({ name: "description", type: "varchar", nullable: true })
1128
- ], Job.prototype, "description", 2);
1085
+ (0, import_typeorm3.Column)({ name: "end_point", type: "varchar" })
1086
+ ], SenseloafLog.prototype, "endpoint", 2);
1129
1087
  __decorateClass([
1130
- (0, import_typeorm9.Column)({ name: "additional_comment", type: "varchar", nullable: true })
1131
- ], Job.prototype, "additionalComment", 2);
1088
+ (0, import_typeorm3.Column)({ name: "success", type: "boolean" })
1089
+ ], SenseloafLog.prototype, "success", 2);
1132
1090
  __decorateClass([
1133
- (0, import_typeorm9.Column)({
1134
- name: "onboarding_tat",
1135
- type: "varchar",
1136
- length: 50,
1137
- nullable: true
1138
- })
1139
- ], Job.prototype, "onboardingTat", 2);
1091
+ (0, import_typeorm3.Column)({ name: "request", type: "jsonb", nullable: true })
1092
+ ], SenseloafLog.prototype, "request", 2);
1140
1093
  __decorateClass([
1141
- (0, import_typeorm9.Column)({
1142
- name: "candidate_communication_skills",
1143
- type: "varchar",
1144
- nullable: true
1145
- })
1146
- ], Job.prototype, "candidateCommunicationSkills", 2);
1094
+ (0, import_typeorm3.Column)({ name: "response", type: "jsonb", nullable: true })
1095
+ ], SenseloafLog.prototype, "response", 2);
1147
1096
  __decorateClass([
1148
- (0, import_typeorm9.Column)({
1149
- name: "step_completed",
1150
- type: "enum",
1151
- enum: Step,
1152
- nullable: true
1153
- })
1154
- ], Job.prototype, "stepCompleted", 2);
1097
+ (0, import_typeorm3.Column)({ name: "error_message", type: "text", nullable: true })
1098
+ ], SenseloafLog.prototype, "errorMessage", 2);
1155
1099
  __decorateClass([
1156
- (0, import_typeorm9.Column)({
1157
- name: "status",
1158
- type: "enum",
1159
- enum: JobStatusEnum,
1160
- default: "DRAFT" /* DRAFT */
1161
- })
1162
- ], Job.prototype, "status", 2);
1100
+ (0, import_typeorm3.Column)({ name: "scope", type: "varchar", nullable: true })
1101
+ ], SenseloafLog.prototype, "scope", 2);
1163
1102
  __decorateClass([
1164
- (0, import_typeorm9.OneToMany)(() => JobSkill, (jobSkill) => jobSkill.job, { cascade: true })
1165
- ], Job.prototype, "jobSkills", 2);
1103
+ (0, import_typeorm3.CreateDateColumn)({ name: "created_at", type: "timestamp with time zone" })
1104
+ ], SenseloafLog.prototype, "createdAt", 2);
1166
1105
  __decorateClass([
1167
- (0, import_typeorm9.OneToMany)(() => JobApplication, (jobApplication) => jobApplication.job, {
1168
- cascade: true
1169
- })
1170
- ], Job.prototype, "jobApplications", 2);
1171
- Job = __decorateClass([
1172
- (0, import_typeorm9.Entity)("jobs")
1173
- ], Job);
1106
+ (0, import_typeorm3.ManyToOne)(() => User, (user) => user.senseloafLogs),
1107
+ (0, import_typeorm3.JoinColumn)({ name: "user_id" })
1108
+ ], SenseloafLog.prototype, "user", 2);
1109
+ SenseloafLog = __decorateClass([
1110
+ (0, import_typeorm3.Entity)("senseloaf_logs")
1111
+ ], SenseloafLog);
1174
1112
 
1175
- // src/entities/bank-details.entity.ts
1176
- var import_typeorm10 = require("typeorm");
1177
- var BankAccountTypeEnum = /* @__PURE__ */ ((BankAccountTypeEnum2) => {
1178
- BankAccountTypeEnum2["PRIMARY"] = "PRIMARY";
1179
- BankAccountTypeEnum2["SECONDARY"] = "SECONDARY";
1180
- return BankAccountTypeEnum2;
1181
- })(BankAccountTypeEnum || {});
1182
- var BankAccountScopeEnum = /* @__PURE__ */ ((BankAccountScopeEnum2) => {
1183
- BankAccountScopeEnum2["DOMESTIC"] = "DOMESTIC";
1184
- BankAccountScopeEnum2["INTERNATIONAL"] = "INTERNATIONAL";
1185
- return BankAccountScopeEnum2;
1186
- })(BankAccountScopeEnum || {});
1187
- var BankDetail = class extends BaseEntity {
1113
+ // src/entities/otp.entity.ts
1114
+ var import_typeorm4 = require("typeorm");
1115
+ var Otp = class {
1188
1116
  };
1189
- // individual index to find bank details by user
1190
1117
  __decorateClass([
1191
- (0, import_typeorm10.Column)({ name: "user_id", type: "integer", nullable: true }),
1192
- (0, import_typeorm10.Index)()
1193
- ], BankDetail.prototype, "userId", 2);
1118
+ (0, import_typeorm4.PrimaryGeneratedColumn)("increment", { type: "integer" })
1119
+ ], Otp.prototype, "id", 2);
1120
+ // individual index to find OTPs by user
1194
1121
  __decorateClass([
1195
- (0, import_typeorm10.ManyToOne)(() => User, (user) => user.bankDetail),
1196
- (0, import_typeorm10.JoinColumn)({ name: "user_id" })
1197
- ], BankDetail.prototype, "user", 2);
1122
+ (0, import_typeorm4.Column)({ name: "user_id", type: "integer", nullable: true }),
1123
+ (0, import_typeorm4.Index)()
1124
+ ], Otp.prototype, "userId", 2);
1198
1125
  __decorateClass([
1199
- (0, import_typeorm10.Column)({ name: "name", type: "varchar", nullable: true })
1200
- ], BankDetail.prototype, "name", 2);
1126
+ (0, import_typeorm4.Column)({ name: "otp", type: "varchar", length: 4 }),
1127
+ (0, import_typeorm4.Index)()
1128
+ ], Otp.prototype, "otp", 2);
1201
1129
  __decorateClass([
1202
- (0, import_typeorm10.Column)({ name: "mobile", type: "varchar", unique: true, nullable: true })
1203
- ], BankDetail.prototype, "mobile", 2);
1130
+ (0, import_typeorm4.Column)({ name: "otp_purpose", type: "varchar", length: 50 })
1131
+ ], Otp.prototype, "otpPurpose", 2);
1204
1132
  __decorateClass([
1205
- (0, import_typeorm10.Column)({ name: "email", type: "varchar", unique: true })
1206
- ], BankDetail.prototype, "email", 2);
1133
+ (0, import_typeorm4.Column)({ name: "target", type: "varchar", nullable: true }),
1134
+ (0, import_typeorm4.Index)()
1135
+ ], Otp.prototype, "target", 2);
1136
+ // support expiration checks
1207
1137
  __decorateClass([
1208
- (0, import_typeorm10.Column)({ name: "address", type: "varchar", nullable: true })
1209
- ], BankDetail.prototype, "address", 2);
1138
+ (0, import_typeorm4.Column)({ name: "expire_at", type: "timestamp" }),
1139
+ (0, import_typeorm4.Index)()
1140
+ ], Otp.prototype, "expiresAt", 2);
1210
1141
  __decorateClass([
1211
- (0, import_typeorm10.Column)({ name: "account_number", type: "varchar", unique: true, nullable: true })
1212
- ], BankDetail.prototype, "accountNumber", 2);
1142
+ (0, import_typeorm4.Column)({ name: "is_used", type: "boolean", default: false }),
1143
+ (0, import_typeorm4.Index)()
1144
+ ], Otp.prototype, "isUsed", 2);
1213
1145
  __decorateClass([
1214
- (0, import_typeorm10.Column)({ name: "bank_name", type: "varchar", nullable: true })
1215
- ], BankDetail.prototype, "bankName", 2);
1146
+ (0, import_typeorm4.Column)({ name: "resend_count", type: "int", default: 0 })
1147
+ ], Otp.prototype, "resendCount", 2);
1216
1148
  __decorateClass([
1217
- (0, import_typeorm10.Column)({ name: "ifsc_code", type: "varchar", nullable: true })
1218
- ], BankDetail.prototype, "ifscCode", 2);
1149
+ (0, import_typeorm4.CreateDateColumn)({ name: "created_at", type: "timestamp with time zone" })
1150
+ ], Otp.prototype, "createdAt", 2);
1219
1151
  __decorateClass([
1220
- (0, import_typeorm10.Column)({ name: "branch_name", type: "varchar", nullable: true })
1221
- ], BankDetail.prototype, "branchName", 2);
1152
+ (0, import_typeorm4.ManyToOne)(() => User, (user) => user.otps),
1153
+ (0, import_typeorm4.JoinColumn)({ name: "user_id" })
1154
+ ], Otp.prototype, "user", 2);
1155
+ Otp = __decorateClass([
1156
+ (0, import_typeorm4.Entity)("otps"),
1157
+ (0, import_typeorm4.Index)(["userId", "otp", "otpPurpose", "isUsed"])
1158
+ ], Otp);
1159
+
1160
+ // src/entities/freelancer-profile.entity.ts
1161
+ var import_typeorm5 = require("typeorm");
1162
+ var NatureOfWork = /* @__PURE__ */ ((NatureOfWork2) => {
1163
+ NatureOfWork2["FULLTIME"] = "FULLTIME";
1164
+ NatureOfWork2["PARTTIME"] = "PARTTIME";
1165
+ NatureOfWork2["BOTH"] = "BOTH";
1166
+ return NatureOfWork2;
1167
+ })(NatureOfWork || {});
1168
+ var ModeOfWork = /* @__PURE__ */ ((ModeOfWork2) => {
1169
+ ModeOfWork2["ONSITE"] = "ONSITE";
1170
+ ModeOfWork2["REMOTE"] = "REMOTE";
1171
+ ModeOfWork2["BOTH"] = "BOTH";
1172
+ return ModeOfWork2;
1173
+ })(ModeOfWork || {});
1174
+ var OnboardingStepEnum = /* @__PURE__ */ ((OnboardingStepEnum2) => {
1175
+ OnboardingStepEnum2["SIGN_UP"] = "SIGN_UP";
1176
+ OnboardingStepEnum2["OTP_VERIFIED"] = "OTP_VERIFIED";
1177
+ OnboardingStepEnum2["UPLOAD_RESUME"] = "UPLOAD_RESUME";
1178
+ OnboardingStepEnum2["AI_VIDEO_ASSESMENT"] = "AI_VIDEO_ASSESMENT";
1179
+ OnboardingStepEnum2["CODING_CHALLENGE"] = "CODING_CHALLENGE";
1180
+ OnboardingStepEnum2["PROFILE_COMPLETION"] = "PROFILE_COMPLETION";
1181
+ return OnboardingStepEnum2;
1182
+ })(OnboardingStepEnum || {});
1183
+ var FreelancerProfile = class extends BaseEntity {
1184
+ };
1185
+ // individual index to find profile by user
1222
1186
  __decorateClass([
1223
- (0, import_typeorm10.Column)({ name: "routing_no", type: "varchar", nullable: true })
1224
- ], BankDetail.prototype, "routingNo", 2);
1187
+ (0, import_typeorm5.Column)({ name: "user_id", type: "integer", nullable: true }),
1188
+ (0, import_typeorm5.Index)()
1189
+ ], FreelancerProfile.prototype, "userId", 2);
1225
1190
  __decorateClass([
1226
- (0, import_typeorm10.Column)({ name: "aba_no", type: "varchar", nullable: true })
1227
- ], BankDetail.prototype, "abaNumber", 2);
1191
+ (0, import_typeorm5.ManyToOne)(() => User, (user) => user.freelancerProfile),
1192
+ (0, import_typeorm5.JoinColumn)({ name: "user_id" })
1193
+ ], FreelancerProfile.prototype, "user", 2);
1228
1194
  __decorateClass([
1229
- (0, import_typeorm10.Column)({ name: "iban", type: "varchar", nullable: true })
1230
- ], BankDetail.prototype, "iban", 2);
1195
+ (0, import_typeorm5.Column)({ name: "resume_url", type: "text", nullable: true })
1196
+ ], FreelancerProfile.prototype, "resumeUrl", 2);
1231
1197
  __decorateClass([
1232
- (0, import_typeorm10.Column)({
1233
- name: "account_type",
1234
- type: "enum",
1235
- enum: BankAccountTypeEnum,
1236
- default: "PRIMARY" /* PRIMARY */
1237
- })
1238
- ], BankDetail.prototype, "accountType", 2);
1198
+ (0, import_typeorm5.Column)({ name: "resume_data", type: "jsonb", nullable: true })
1199
+ ], FreelancerProfile.prototype, "resumeData", 2);
1239
1200
  __decorateClass([
1240
- (0, import_typeorm10.Column)({
1241
- name: "account_scope",
1201
+ (0, import_typeorm5.Column)({ name: "is_developer", type: "boolean", default: false })
1202
+ ], FreelancerProfile.prototype, "isDeveloper", 2);
1203
+ __decorateClass([
1204
+ (0, import_typeorm5.Column)({
1205
+ name: "nature_of_work",
1242
1206
  type: "enum",
1243
- enum: BankAccountScopeEnum,
1244
- default: "DOMESTIC" /* DOMESTIC */
1207
+ enum: NatureOfWork,
1208
+ nullable: true
1245
1209
  })
1246
- ], BankDetail.prototype, "accountScope", 2);
1247
- BankDetail = __decorateClass([
1248
- (0, import_typeorm10.Entity)("bank_details")
1249
- ], BankDetail);
1250
-
1251
- // src/entities/system-preference.entity.ts
1252
- var import_typeorm11 = require("typeorm");
1253
- var SystemPreference = class extends BaseEntity {
1254
- };
1255
- // individual index to find system preference by user
1256
- __decorateClass([
1257
- (0, import_typeorm11.Column)({ name: "user_id", type: "integer", nullable: true }),
1258
- (0, import_typeorm11.Index)()
1259
- ], SystemPreference.prototype, "userId", 2);
1210
+ ], FreelancerProfile.prototype, "natureOfWork", 2);
1260
1211
  __decorateClass([
1261
- (0, import_typeorm11.ManyToOne)(() => User, (user) => user.systemPreference),
1262
- (0, import_typeorm11.JoinColumn)({ name: "user_id" })
1263
- ], SystemPreference.prototype, "user", 2);
1212
+ (0, import_typeorm5.Column)({ name: "currency", type: "varchar", default: "USD" })
1213
+ ], FreelancerProfile.prototype, "currency", 2);
1264
1214
  __decorateClass([
1265
- (0, import_typeorm11.Column)({ name: "key", type: "varchar", unique: true, nullable: false })
1266
- ], SystemPreference.prototype, "key", 2);
1215
+ (0, import_typeorm5.Column)({
1216
+ name: "expected_hourly_compensation",
1217
+ type: "numeric",
1218
+ precision: 10,
1219
+ scale: 2,
1220
+ nullable: true
1221
+ })
1222
+ ], FreelancerProfile.prototype, "expectedHourlyCompensation", 2);
1267
1223
  __decorateClass([
1268
- (0, import_typeorm11.Column)({ name: "value", type: "boolean", default: false })
1269
- ], SystemPreference.prototype, "value", 2);
1270
- SystemPreference = __decorateClass([
1271
- (0, import_typeorm11.Entity)("system_preferences")
1272
- ], SystemPreference);
1273
-
1274
- // src/entities/rating.entity.ts
1275
- var import_typeorm12 = require("typeorm");
1276
- var RatingTypeEnum = /* @__PURE__ */ ((RatingTypeEnum2) => {
1277
- RatingTypeEnum2["FREELANCER_TO_CLIENT"] = "FREELANCER_TO_CLIENT";
1278
- RatingTypeEnum2["CLIENT_TO_FREELANCER"] = "CLIENT_TO_FREELANCER";
1279
- return RatingTypeEnum2;
1280
- })(RatingTypeEnum || {});
1281
- var Rating = class extends BaseEntity {
1282
- };
1283
- __decorateClass([
1284
- (0, import_typeorm12.Column)({ name: "reviewer_id", type: "integer" }),
1285
- (0, import_typeorm12.Index)()
1286
- ], Rating.prototype, "reviewer_id", 2);
1287
- __decorateClass([
1288
- (0, import_typeorm12.ManyToOne)(() => User, { onDelete: "CASCADE" }),
1289
- (0, import_typeorm12.JoinColumn)({ name: "reviewer_id" })
1290
- ], Rating.prototype, "reviewer", 2);
1291
- __decorateClass([
1292
- (0, import_typeorm12.Column)({ name: "reviewee_id", type: "integer" }),
1293
- (0, import_typeorm12.Index)()
1294
- ], Rating.prototype, "reviewee_id", 2);
1295
- __decorateClass([
1296
- (0, import_typeorm12.ManyToOne)(() => User, { onDelete: "CASCADE" }),
1297
- (0, import_typeorm12.JoinColumn)({ name: "reviewee_id" })
1298
- ], Rating.prototype, "reviewee", 2);
1299
- __decorateClass([
1300
- (0, import_typeorm12.Column)({
1224
+ (0, import_typeorm5.Column)({
1225
+ name: "mode_of_work",
1301
1226
  type: "enum",
1302
- enum: RatingTypeEnum,
1227
+ enum: ModeOfWork,
1303
1228
  nullable: true
1304
1229
  })
1305
- ], Rating.prototype, "ratingType", 2);
1306
- __decorateClass([
1307
- (0, import_typeorm12.Column)({ type: "integer", nullable: true })
1308
- ], Rating.prototype, "rating", 2);
1309
- __decorateClass([
1310
- (0, import_typeorm12.Column)({ type: "text", nullable: true })
1311
- ], Rating.prototype, "review", 2);
1312
- Rating = __decorateClass([
1313
- (0, import_typeorm12.Entity)("ratings")
1314
- ], Rating);
1315
-
1316
- // src/entities/company-role.entity.ts
1317
- var import_typeorm13 = require("typeorm");
1318
- var CompanyRole = class extends BaseEntity {
1319
- };
1320
- // individual index to find company roles by user
1321
- __decorateClass([
1322
- (0, import_typeorm13.Column)({ name: "user_id", type: "integer", nullable: true }),
1323
- (0, import_typeorm13.Index)()
1324
- ], CompanyRole.prototype, "userId", 2);
1230
+ ], FreelancerProfile.prototype, "modeOfWork", 2);
1325
1231
  __decorateClass([
1326
- (0, import_typeorm13.ManyToOne)(() => User, (user) => user.companyRole),
1327
- (0, import_typeorm13.JoinColumn)({ name: "user_id" })
1328
- ], CompanyRole.prototype, "user", 2);
1232
+ (0, import_typeorm5.Column)({ name: "availability_to_join", type: "varchar", nullable: true })
1233
+ ], FreelancerProfile.prototype, "availabilityToJoin", 2);
1329
1234
  __decorateClass([
1330
- (0, import_typeorm13.Column)({ name: "name", type: "varchar" })
1331
- ], CompanyRole.prototype, "name", 2);
1235
+ (0, import_typeorm5.Column)({ name: "is_immediate_joiner", type: "boolean", nullable: true })
1236
+ ], FreelancerProfile.prototype, "isImmediateJoiner", 2);
1332
1237
  __decorateClass([
1333
- (0, import_typeorm13.Column)({ name: "slug", type: "varchar", nullable: true, unique: true }),
1334
- (0, import_typeorm13.Index)()
1335
- ], CompanyRole.prototype, "slug", 2);
1238
+ (0, import_typeorm5.Column)({ name: "linkedin_profile_link", type: "varchar", nullable: true })
1239
+ ], FreelancerProfile.prototype, "linkedinProfileLink", 2);
1336
1240
  __decorateClass([
1337
- (0, import_typeorm13.Column)({ name: "description", type: "text", nullable: true })
1338
- ], CompanyRole.prototype, "description", 2);
1241
+ (0, import_typeorm5.Column)({ name: "kaggle_profile_link", type: "varchar", nullable: true })
1242
+ ], FreelancerProfile.prototype, "kaggleProfileLink", 2);
1339
1243
  __decorateClass([
1340
- (0, import_typeorm13.Column)({ name: "is_active", type: "boolean", default: true })
1341
- ], CompanyRole.prototype, "isActive", 2);
1342
- CompanyRole = __decorateClass([
1343
- (0, import_typeorm13.Entity)("company_roles")
1344
- ], CompanyRole);
1345
-
1346
- // src/entities/freelancer-experience.entity.ts
1347
- var import_typeorm14 = require("typeorm");
1348
- var FreelancerExperience = class extends BaseEntity {
1349
- };
1350
- // individual index to find experence by user
1244
+ (0, import_typeorm5.Column)({ name: "github_profile_link", type: "varchar", nullable: true })
1245
+ ], FreelancerProfile.prototype, "githubProfileLink", 2);
1351
1246
  __decorateClass([
1352
- (0, import_typeorm14.Column)({ name: "user_id", type: "integer", nullable: true }),
1353
- (0, import_typeorm14.Index)()
1354
- ], FreelancerExperience.prototype, "userId", 2);
1247
+ (0, import_typeorm5.Column)({
1248
+ name: "stack_overflow_profile_link",
1249
+ type: "varchar",
1250
+ nullable: true
1251
+ })
1252
+ ], FreelancerProfile.prototype, "stackOverflowProfileLink", 2);
1355
1253
  __decorateClass([
1356
- (0, import_typeorm14.ManyToOne)(() => User, (user) => user.freelancerExperience),
1357
- (0, import_typeorm14.JoinColumn)({ name: "user_id" })
1358
- ], FreelancerExperience.prototype, "user", 2);
1254
+ (0, import_typeorm5.Column)({ name: "portfolio_link", type: "varchar", nullable: true })
1255
+ ], FreelancerProfile.prototype, "portfolioLink", 2);
1359
1256
  __decorateClass([
1360
- (0, import_typeorm14.Column)({ name: "company_name", type: "varchar", nullable: true })
1361
- ], FreelancerExperience.prototype, "companyName", 2);
1257
+ (0, import_typeorm5.Column)({
1258
+ name: "onboarding_step_completed",
1259
+ type: "enum",
1260
+ enum: OnboardingStepEnum,
1261
+ nullable: true
1262
+ })
1263
+ ], FreelancerProfile.prototype, "onboardingStepCompleted", 2);
1362
1264
  __decorateClass([
1363
- (0, import_typeorm14.Column)({ name: "designation", type: "varchar", nullable: true })
1364
- ], FreelancerExperience.prototype, "designation", 2);
1265
+ (0, import_typeorm5.Column)({ name: "country_id", type: "integer", nullable: true })
1266
+ ], FreelancerProfile.prototype, "countryId", 2);
1365
1267
  __decorateClass([
1366
- (0, import_typeorm14.Column)({ name: "job_duration", type: "varchar", nullable: true })
1367
- ], FreelancerExperience.prototype, "jobDuration", 2);
1268
+ (0, import_typeorm5.Column)({ name: "address", type: "varchar", nullable: true })
1269
+ ], FreelancerProfile.prototype, "address", 2);
1368
1270
  __decorateClass([
1369
- (0, import_typeorm14.Column)({ name: "description", type: "varchar", nullable: true })
1370
- ], FreelancerExperience.prototype, "description", 2);
1371
- FreelancerExperience = __decorateClass([
1372
- (0, import_typeorm14.Entity)("freelancer_experiences")
1373
- ], FreelancerExperience);
1271
+ (0, import_typeorm5.Column)({ name: "about", type: "varchar", nullable: true })
1272
+ ], FreelancerProfile.prototype, "about", 2);
1273
+ FreelancerProfile = __decorateClass([
1274
+ (0, import_typeorm5.Entity)("freelancer_profiles")
1275
+ ], FreelancerProfile);
1374
1276
 
1375
- // src/entities/user.entity.ts
1376
- var AccountType = /* @__PURE__ */ ((AccountType2) => {
1377
- AccountType2["ADMIN"] = "ADMIN";
1378
- AccountType2["SUB_ADMIN"] = "SUB_ADMIN";
1379
- AccountType2["CLIENT"] = "CLIENT";
1380
- AccountType2["FREELANCER"] = "FREELANCER";
1381
- return AccountType2;
1382
- })(AccountType || {});
1383
- var AccountStatus = /* @__PURE__ */ ((AccountStatus2) => {
1384
- AccountStatus2["INACTIVE"] = "INACTIVE";
1385
- AccountStatus2["ACTIVE"] = "ACTIVE";
1386
- AccountStatus2["SUSPENDED"] = "SUSPENDED";
1387
- AccountStatus2["BLOCKED"] = "BLOCKED";
1388
- return AccountStatus2;
1389
- })(AccountStatus || {});
1390
- var Provider = /* @__PURE__ */ ((Provider2) => {
1391
- Provider2["LINKEDIN"] = "LINKEDIN";
1392
- Provider2["GOOGLE"] = "GOOGLE";
1393
- Provider2["GITLABS"] = "GITLABS";
1394
- return Provider2;
1395
- })(Provider || {});
1396
- var User = class extends BaseEntity {
1277
+ // src/entities/company-profile.entity.ts
1278
+ var import_typeorm6 = require("typeorm");
1279
+ var KindOfHire = /* @__PURE__ */ ((KindOfHire2) => {
1280
+ KindOfHire2["FULLTIME"] = "FULLTIME";
1281
+ KindOfHire2["SHORTTIME"] = "SHORTTIME";
1282
+ KindOfHire2["BOTH"] = "BOTH";
1283
+ return KindOfHire2;
1284
+ })(KindOfHire || {});
1285
+ var ModeOfHire = /* @__PURE__ */ ((ModeOfHire2) => {
1286
+ ModeOfHire2["ONSITE"] = "ONSITE";
1287
+ ModeOfHire2["REMOTE"] = "REMOTE";
1288
+ ModeOfHire2["BOTH"] = "BOTH";
1289
+ return ModeOfHire2;
1290
+ })(ModeOfHire || {});
1291
+ var FromUsOn = /* @__PURE__ */ ((FromUsOn2) => {
1292
+ FromUsOn2["LINKEDIN"] = "LINKEDIN";
1293
+ FromUsOn2["GOOGLE"] = "GOOGLE";
1294
+ FromUsOn2["REFERRAL"] = "REFERRAL";
1295
+ FromUsOn2["OTHER"] = "OTHER";
1296
+ return FromUsOn2;
1297
+ })(FromUsOn || {});
1298
+ var CompanyProfile = class extends BaseEntity {
1397
1299
  };
1300
+ // individual index to find company profile by user
1398
1301
  __decorateClass([
1399
- (0, import_typeorm15.Column)({ name: "unique_id", type: "varchar", unique: true })
1400
- ], User.prototype, "uniqueId", 2);
1401
- __decorateClass([
1402
- (0, import_typeorm15.Column)({ name: "parent_id", type: "integer", nullable: true }),
1403
- (0, import_typeorm15.Index)()
1404
- ], User.prototype, "parentId", 2);
1405
- __decorateClass([
1406
- (0, import_typeorm15.ManyToOne)(() => User, (user) => user.children, { nullable: true }),
1407
- (0, import_typeorm15.JoinColumn)({ name: "parent_id" })
1408
- ], User.prototype, "parent", 2);
1409
- __decorateClass([
1410
- (0, import_typeorm15.OneToMany)(() => User, (user) => user.parent)
1411
- ], User.prototype, "children", 2);
1302
+ (0, import_typeorm6.Column)({ name: "user_id", type: "integer", nullable: true }),
1303
+ (0, import_typeorm6.Index)()
1304
+ ], CompanyProfile.prototype, "userId", 2);
1412
1305
  __decorateClass([
1413
- (0, import_typeorm15.Column)({ name: "username", type: "varchar", unique: true, nullable: true })
1414
- ], User.prototype, "username", 2);
1306
+ (0, import_typeorm6.ManyToOne)(() => User, (user) => user.otps),
1307
+ (0, import_typeorm6.JoinColumn)({ name: "user_id" })
1308
+ ], CompanyProfile.prototype, "user", 2);
1415
1309
  __decorateClass([
1416
- (0, import_typeorm15.Column)({ name: "first_name", type: "varchar", length: 100, nullable: true })
1417
- ], User.prototype, "firstName", 2);
1310
+ (0, import_typeorm6.Column)({ name: "company_name", type: "varchar", nullable: true })
1311
+ ], CompanyProfile.prototype, "companyName", 2);
1418
1312
  __decorateClass([
1419
- (0, import_typeorm15.Column)({ name: "last_name", type: "varchar", length: 100, nullable: true })
1420
- ], User.prototype, "lastName", 2);
1313
+ (0, import_typeorm6.Column)({ name: "bio", type: "varchar", nullable: true })
1314
+ ], CompanyProfile.prototype, "bio", 2);
1421
1315
  __decorateClass([
1422
- (0, import_typeorm15.Column)({ name: "date_of_birth", type: "date", nullable: true })
1423
- ], User.prototype, "dateOfBirth", 2);
1316
+ (0, import_typeorm6.Column)({ name: "website", type: "varchar", nullable: true })
1317
+ ], CompanyProfile.prototype, "webSite", 2);
1424
1318
  __decorateClass([
1425
- (0, import_typeorm15.Column)({ name: "gender", type: "varchar", length: 10, nullable: true })
1426
- ], User.prototype, "gender", 2);
1319
+ (0, import_typeorm6.Column)({ name: "about_company", type: "varchar", nullable: true })
1320
+ ], CompanyProfile.prototype, "aboutCompany", 2);
1427
1321
  __decorateClass([
1428
- (0, import_typeorm15.Column)({ name: "profile_picture_url", type: "text", nullable: true })
1429
- ], User.prototype, "profilePictureUrl", 2);
1322
+ (0, import_typeorm6.Column)({ name: "is_service_aggrement_signed", type: "boolean", default: false })
1323
+ ], CompanyProfile.prototype, "isServiceAgreementSigned", 2);
1430
1324
  __decorateClass([
1431
- (0, import_typeorm15.Column)({ name: "email", type: "varchar", unique: true })
1432
- ], User.prototype, "email", 2);
1325
+ (0, import_typeorm6.Column)({ name: "company_address", type: "varchar", nullable: true })
1326
+ ], CompanyProfile.prototype, "companyAddress", 2);
1433
1327
  __decorateClass([
1434
- (0, import_typeorm15.Column)({ name: "mobile_code", type: "varchar", nullable: true })
1435
- ], User.prototype, "mobileCode", 2);
1328
+ (0, import_typeorm6.Column)({ name: "phone_number", type: "varchar", nullable: true })
1329
+ ], CompanyProfile.prototype, "phoneNumber", 2);
1436
1330
  __decorateClass([
1437
- (0, import_typeorm15.Column)({ name: "mobile", type: "varchar", unique: true, nullable: true })
1438
- ], User.prototype, "mobile", 2);
1331
+ (0, import_typeorm6.Column)({ name: "skills", type: "text", nullable: true })
1332
+ ], CompanyProfile.prototype, "skills", 2);
1439
1333
  __decorateClass([
1440
- (0, import_typeorm15.Column)({ name: "password", type: "varchar" })
1441
- ], User.prototype, "password", 2);
1334
+ (0, import_typeorm6.Column)({ name: "required_freelancer", type: "varchar", nullable: true })
1335
+ ], CompanyProfile.prototype, "requiredFreelancer", 2);
1442
1336
  __decorateClass([
1443
- (0, import_typeorm15.Column)({
1444
- name: "account_type",
1337
+ (0, import_typeorm6.Column)({
1338
+ name: "kind_of_hiring",
1445
1339
  type: "enum",
1446
- enum: AccountType,
1447
- default: "FREELANCER" /* FREELANCER */
1340
+ enum: KindOfHire,
1341
+ nullable: true
1448
1342
  })
1449
- ], User.prototype, "accountType", 2);
1343
+ ], CompanyProfile.prototype, "kindOfHiring", 2);
1450
1344
  __decorateClass([
1451
- (0, import_typeorm15.Column)({
1452
- name: "account_status",
1345
+ (0, import_typeorm6.Column)({
1346
+ name: "mode_of_hire",
1453
1347
  type: "enum",
1454
- enum: AccountStatus,
1455
- default: "INACTIVE" /* INACTIVE */
1348
+ enum: ModeOfHire,
1349
+ nullable: true
1456
1350
  })
1457
- ], User.prototype, "accountStatus", 2);
1458
- __decorateClass([
1459
- (0, import_typeorm15.Column)({ name: "is_email_verified", type: "boolean", default: false })
1460
- ], User.prototype, "isEmailVerified", 2);
1461
- __decorateClass([
1462
- (0, import_typeorm15.Column)({ name: "is_mobile_verified", type: "boolean", default: false })
1463
- ], User.prototype, "isMobileVerified", 2);
1351
+ ], CompanyProfile.prototype, "modeOfHire", 2);
1464
1352
  __decorateClass([
1465
- (0, import_typeorm15.Column)({
1466
- name: "last_login_at",
1467
- type: "timestamp with time zone",
1353
+ (0, import_typeorm6.Column)({
1354
+ name: "found_us_on",
1355
+ type: "enum",
1356
+ enum: FromUsOn,
1468
1357
  nullable: true
1469
1358
  })
1470
- ], User.prototype, "lastLoginAt", 2);
1359
+ ], CompanyProfile.prototype, "foundUsOn", 2);
1360
+ CompanyProfile = __decorateClass([
1361
+ (0, import_typeorm6.Entity)("company_profiles")
1362
+ ], CompanyProfile);
1363
+
1364
+ // src/entities/job.entity.ts
1365
+ var import_typeorm10 = require("typeorm");
1366
+
1367
+ // src/entities/job-skill.entity.ts
1368
+ var import_typeorm8 = require("typeorm");
1369
+
1370
+ // src/entities/skill.entity.ts
1371
+ var import_typeorm7 = require("typeorm");
1372
+ var Skill = class extends BaseEntity {
1373
+ };
1471
1374
  __decorateClass([
1472
- (0, import_typeorm15.Column)({ name: "last_login_ip", type: "varchar", nullable: true })
1473
- ], User.prototype, "lastLoginIp", 2);
1375
+ (0, import_typeorm7.Column)({ name: "name", type: "varchar", nullable: true })
1376
+ ], Skill.prototype, "name", 2);
1474
1377
  __decorateClass([
1475
- (0, import_typeorm15.Column)({ name: "reset_token", type: "varchar", nullable: true })
1476
- ], User.prototype, "resetToken", 2);
1477
- __decorateClass([
1478
- (0, import_typeorm15.Column)({
1479
- name: "reset_token_expire_at",
1480
- type: "timestamp with time zone",
1481
- nullable: true
1482
- })
1483
- ], User.prototype, "resetTokenExpireAt", 2);
1484
- __decorateClass([
1485
- (0, import_typeorm15.OneToMany)(() => RefreshToken, (token) => token.user)
1486
- ], User.prototype, "refreshTokens", 2);
1487
- __decorateClass([
1488
- (0, import_typeorm15.Column)({
1489
- name: "provider",
1490
- type: "enum",
1491
- enum: Provider,
1492
- default: null,
1493
- nullable: true
1494
- })
1495
- ], User.prototype, "provider", 2);
1496
- __decorateClass([
1497
- (0, import_typeorm15.Column)({ name: "provider_token", type: "varchar", nullable: true })
1498
- ], User.prototype, "providerToken", 2);
1499
- __decorateClass([
1500
- (0, import_typeorm15.Column)({ name: "linkedin_id", type: "varchar", nullable: true })
1501
- ], User.prototype, "linkedInId", 2);
1502
- __decorateClass([
1503
- (0, import_typeorm15.Column)({ name: "google_id", type: "varchar", nullable: true })
1504
- ], User.prototype, "googleId", 2);
1505
- __decorateClass([
1506
- (0, import_typeorm15.Column)({ name: "gitlabs_id", type: "varchar", nullable: true })
1507
- ], User.prototype, "gitLabsId", 2);
1508
- __decorateClass([
1509
- (0, import_typeorm15.OneToMany)(() => Otp, (otp) => otp.user)
1510
- ], User.prototype, "otps", 2);
1511
- __decorateClass([
1512
- (0, import_typeorm15.OneToMany)(() => SenseloafLog, (senseloafLog) => senseloafLog.user)
1513
- ], User.prototype, "senseloafLogs", 2);
1514
- __decorateClass([
1515
- (0, import_typeorm15.OneToOne)(
1516
- () => FreelancerProfile,
1517
- (freelancerProfile) => freelancerProfile.user
1518
- )
1519
- ], User.prototype, "freelancerProfile", 2);
1520
- __decorateClass([
1521
- (0, import_typeorm15.OneToOne)(() => CompanyProfile, (companyProfile) => companyProfile.user, { cascade: true })
1522
- ], User.prototype, "companyProfile", 2);
1523
- __decorateClass([
1524
- (0, import_typeorm15.OneToMany)(() => Job, (job) => job.user)
1525
- ], User.prototype, "jobs", 2);
1526
- __decorateClass([
1527
- (0, import_typeorm15.OneToMany)(() => BankDetail, (bankDetail) => bankDetail.user)
1528
- ], User.prototype, "bankDetail", 2);
1529
- __decorateClass([
1530
- (0, import_typeorm15.OneToMany)(
1531
- () => SystemPreference,
1532
- (systemPreference) => systemPreference.user
1533
- )
1534
- ], User.prototype, "systemPreference", 2);
1535
- __decorateClass([
1536
- (0, import_typeorm15.OneToMany)(() => Rating, (rating) => rating.reviewer)
1537
- ], User.prototype, "givenRatings", 2);
1538
- __decorateClass([
1539
- (0, import_typeorm15.OneToMany)(() => Rating, (rating) => rating.reviewee)
1540
- ], User.prototype, "receivedRatings", 2);
1541
- __decorateClass([
1542
- (0, import_typeorm15.OneToMany)(() => JobApplication, (jobApplication) => jobApplication.user)
1543
- ], User.prototype, "jobApplications", 2);
1378
+ (0, import_typeorm7.Column)({ name: "slug", type: "varchar", nullable: true, unique: true })
1379
+ ], Skill.prototype, "slug", 2);
1544
1380
  __decorateClass([
1545
- (0, import_typeorm15.OneToMany)(() => CompanyRole, (companyRole) => companyRole.user)
1546
- ], User.prototype, "companyRole", 2);
1381
+ (0, import_typeorm7.Column)({ name: "is_active", type: "boolean", default: false })
1382
+ ], Skill.prototype, "isActive", 2);
1547
1383
  __decorateClass([
1548
- (0, import_typeorm15.OneToOne)(() => FreelancerExperience, (freelancerExperience) => freelancerExperience.user)
1549
- ], User.prototype, "freelancerExperience", 2);
1550
- User = __decorateClass([
1551
- (0, import_typeorm15.Entity)("users")
1552
- ], User);
1384
+ (0, import_typeorm7.OneToMany)(() => JobSkill, (jobSkill) => jobSkill.skill)
1385
+ ], Skill.prototype, "jobSkills", 2);
1386
+ Skill = __decorateClass([
1387
+ (0, import_typeorm7.Entity)("skills")
1388
+ ], Skill);
1553
1389
 
1554
- // src/entities/company-profile.entity.ts
1555
- var KindOfHire = /* @__PURE__ */ ((KindOfHire2) => {
1556
- KindOfHire2["FULLTIME"] = "FULLTIME";
1557
- KindOfHire2["SHORTTIME"] = "SHORTTIME";
1558
- KindOfHire2["BOTH"] = "BOTH";
1559
- return KindOfHire2;
1560
- })(KindOfHire || {});
1561
- var ModeOfHire = /* @__PURE__ */ ((ModeOfHire2) => {
1562
- ModeOfHire2["ONSITE"] = "ONSITE";
1563
- ModeOfHire2["REMOTE"] = "REMOTE";
1564
- ModeOfHire2["BOTH"] = "BOTH";
1565
- return ModeOfHire2;
1566
- })(ModeOfHire || {});
1567
- var FromUsOn = /* @__PURE__ */ ((FromUsOn2) => {
1568
- FromUsOn2["LINKEDIN"] = "LINKEDIN";
1569
- FromUsOn2["GOOGLE"] = "GOOGLE";
1570
- FromUsOn2["REFERRAL"] = "REFERRAL";
1571
- FromUsOn2["OTHER"] = "OTHER";
1572
- return FromUsOn2;
1573
- })(FromUsOn || {});
1574
- var CompanyProfile = class extends BaseEntity {
1390
+ // src/entities/job-skill.entity.ts
1391
+ var JobSkill = class extends BaseEntity {
1575
1392
  };
1576
- // individual index to find company profile by user
1577
1393
  __decorateClass([
1578
- (0, import_typeorm16.Column)({ name: "user_id", type: "integer", nullable: true }),
1579
- (0, import_typeorm16.Index)()
1580
- ], CompanyProfile.prototype, "userId", 2);
1394
+ (0, import_typeorm8.Column)({ name: "job_id", type: "integer" }),
1395
+ (0, import_typeorm8.Index)()
1396
+ ], JobSkill.prototype, "jobId", 2);
1581
1397
  __decorateClass([
1582
- (0, import_typeorm16.ManyToOne)(() => User, (user) => user.otps),
1583
- (0, import_typeorm16.JoinColumn)({ name: "user_id" })
1584
- ], CompanyProfile.prototype, "user", 2);
1398
+ (0, import_typeorm8.ManyToOne)(() => Job, (job) => job.jobSkills, { onDelete: "CASCADE" }),
1399
+ (0, import_typeorm8.JoinColumn)({ name: "job_id" })
1400
+ ], JobSkill.prototype, "job", 2);
1585
1401
  __decorateClass([
1586
- (0, import_typeorm16.Column)({ name: "company_name", type: "varchar", nullable: true })
1587
- ], CompanyProfile.prototype, "companyName", 2);
1402
+ (0, import_typeorm8.Column)({ name: "skill_id", type: "integer" }),
1403
+ (0, import_typeorm8.Index)()
1404
+ ], JobSkill.prototype, "skillId", 2);
1588
1405
  __decorateClass([
1589
- (0, import_typeorm16.Column)({ name: "bio", type: "varchar", nullable: true })
1590
- ], CompanyProfile.prototype, "bio", 2);
1406
+ (0, import_typeorm8.ManyToOne)(() => Skill, (skill) => skill.jobSkills, { onDelete: "CASCADE" }),
1407
+ (0, import_typeorm8.JoinColumn)({ name: "skill_id" })
1408
+ ], JobSkill.prototype, "skill", 2);
1409
+ JobSkill = __decorateClass([
1410
+ (0, import_typeorm8.Entity)("job_skills")
1411
+ ], JobSkill);
1412
+
1413
+ // src/entities/job-application.entity.ts
1414
+ var import_typeorm9 = require("typeorm");
1415
+ var ApplicationStatusEnum = /* @__PURE__ */ ((ApplicationStatusEnum2) => {
1416
+ ApplicationStatusEnum2["PENDING"] = "PENDING";
1417
+ ApplicationStatusEnum2["SHORTLISTED"] = "SHORTLISTED";
1418
+ ApplicationStatusEnum2["INTERVIEW_IN_PROGRESS"] = "INTERVIEW_IN_PROGRESS";
1419
+ ApplicationStatusEnum2["INTERVIEWED"] = "INTERVIEWED";
1420
+ ApplicationStatusEnum2["OFFERED"] = "OFFERED";
1421
+ ApplicationStatusEnum2["HIRED"] = "HIRED";
1422
+ ApplicationStatusEnum2["REJECTED_BEFORE_INTERVIEW"] = "REJECTED_BEFORE_INTERVIEW";
1423
+ ApplicationStatusEnum2["REJECTED_IN_INTERVIEW"] = "REJECTED_IN_INTERVIEW";
1424
+ ApplicationStatusEnum2["REJECTED_AFTER_INTERVIEW"] = "REJECTED_AFTER_INTERVIEW";
1425
+ ApplicationStatusEnum2["NOT_SUITABLE"] = "NOT_SUITABLE";
1426
+ ApplicationStatusEnum2["WITHDRAWN"] = "WITHDRAWN";
1427
+ return ApplicationStatusEnum2;
1428
+ })(ApplicationStatusEnum || {});
1429
+ var JobApplication = class extends BaseEntity {
1430
+ };
1591
1431
  __decorateClass([
1592
- (0, import_typeorm16.Column)({ name: "website", type: "varchar", nullable: true })
1593
- ], CompanyProfile.prototype, "webSite", 2);
1432
+ (0, import_typeorm9.Column)({
1433
+ name: "job_application_id",
1434
+ type: "varchar",
1435
+ unique: true,
1436
+ nullable: true
1437
+ })
1438
+ ], JobApplication.prototype, "jobApplicationId", 2);
1594
1439
  __decorateClass([
1595
- (0, import_typeorm16.Column)({ name: "about_company", type: "varchar", nullable: true })
1596
- ], CompanyProfile.prototype, "aboutCompany", 2);
1440
+ (0, import_typeorm9.Column)({ name: "job_id", type: "integer" }),
1441
+ (0, import_typeorm9.Index)()
1442
+ ], JobApplication.prototype, "jobId", 2);
1597
1443
  __decorateClass([
1598
- (0, import_typeorm16.Column)({ name: "is_service_aggrement_signed", type: "boolean", default: false })
1599
- ], CompanyProfile.prototype, "isServiceAgreementSigned", 2);
1444
+ (0, import_typeorm9.ManyToOne)(() => Job, (job) => job.jobApplications, { onDelete: "CASCADE" }),
1445
+ (0, import_typeorm9.JoinColumn)({ name: "job_id" })
1446
+ ], JobApplication.prototype, "job", 2);
1600
1447
  __decorateClass([
1601
- (0, import_typeorm16.Column)({ name: "company_address", type: "varchar", nullable: true })
1602
- ], CompanyProfile.prototype, "companyAddress", 2);
1448
+ (0, import_typeorm9.Column)({ name: "user_id", type: "integer" }),
1449
+ (0, import_typeorm9.Index)()
1450
+ ], JobApplication.prototype, "userId", 2);
1603
1451
  __decorateClass([
1604
- (0, import_typeorm16.Column)({ name: "phone_number", type: "varchar", nullable: true })
1605
- ], CompanyProfile.prototype, "phoneNumber", 2);
1452
+ (0, import_typeorm9.ManyToOne)(() => User, (user) => user.jobApplications),
1453
+ (0, import_typeorm9.JoinColumn)({ name: "user_id" })
1454
+ ], JobApplication.prototype, "user", 2);
1606
1455
  __decorateClass([
1607
- (0, import_typeorm16.Column)({ name: "skills", type: "text", nullable: true })
1608
- ], CompanyProfile.prototype, "skills", 2);
1456
+ (0, import_typeorm9.Column)({
1457
+ name: "status",
1458
+ type: "enum",
1459
+ enum: ApplicationStatusEnum,
1460
+ default: "PENDING" /* PENDING */
1461
+ })
1462
+ ], JobApplication.prototype, "status", 2);
1609
1463
  __decorateClass([
1610
- (0, import_typeorm16.Column)({ name: "required_freelancer", type: "varchar", nullable: true })
1611
- ], CompanyProfile.prototype, "requiredFreelancer", 2);
1464
+ (0, import_typeorm9.Column)({
1465
+ name: "applied_at",
1466
+ type: "timestamp with time zone",
1467
+ default: () => "CURRENT_TIMESTAMP"
1468
+ })
1469
+ ], JobApplication.prototype, "appliedAt", 2);
1612
1470
  __decorateClass([
1613
- (0, import_typeorm16.Column)({
1614
- name: "kind_of_hiring",
1615
- type: "enum",
1616
- enum: KindOfHire,
1471
+ (0, import_typeorm9.Column)({
1472
+ name: "shortlisted_at",
1473
+ type: "timestamp with time zone",
1617
1474
  nullable: true
1618
1475
  })
1619
- ], CompanyProfile.prototype, "kindOfHiring", 2);
1476
+ ], JobApplication.prototype, "shortlistedAt", 2);
1620
1477
  __decorateClass([
1621
- (0, import_typeorm16.Column)({
1622
- name: "mode_of_hire",
1623
- type: "enum",
1624
- enum: ModeOfHire,
1478
+ (0, import_typeorm9.Column)({
1479
+ name: "interview_started_at",
1480
+ type: "timestamp with time zone",
1625
1481
  nullable: true
1626
1482
  })
1627
- ], CompanyProfile.prototype, "modeOfHire", 2);
1483
+ ], JobApplication.prototype, "interviewStartedAt", 2);
1628
1484
  __decorateClass([
1629
- (0, import_typeorm16.Column)({
1630
- name: "found_us_on",
1631
- type: "enum",
1632
- enum: FromUsOn,
1485
+ (0, import_typeorm9.Column)({
1486
+ name: "interview_completed_at",
1487
+ type: "timestamp with time zone",
1633
1488
  nullable: true
1634
1489
  })
1635
- ], CompanyProfile.prototype, "foundUsOn", 2);
1636
- CompanyProfile = __decorateClass([
1637
- (0, import_typeorm16.Entity)("company_profiles")
1638
- ], CompanyProfile);
1639
-
1640
- // src/modules/user/client-profile/dto/update-client-profile.dto.ts
1641
- var UpdateCompanyProfileDto = class {
1642
- };
1643
- __decorateClass([
1644
- (0, import_class_validator17.IsString)({ message: "Company name must be a string." })
1645
- ], UpdateCompanyProfileDto.prototype, "companyName", 2);
1646
- __decorateClass([
1647
- (0, import_class_validator17.IsOptional)(),
1648
- (0, import_class_validator17.IsString)({ message: "Company bio must be a string." })
1649
- ], UpdateCompanyProfileDto.prototype, "bio", 2);
1650
- __decorateClass([
1651
- (0, import_class_validator17.IsOptional)(),
1652
- (0, import_class_validator17.IsString)({ message: "Company website url must be a string." })
1653
- ], UpdateCompanyProfileDto.prototype, "webSite", 2);
1654
- __decorateClass([
1655
- (0, import_class_validator17.IsOptional)(),
1656
- (0, import_class_validator17.IsString)({ message: "About company must be a string." })
1657
- ], UpdateCompanyProfileDto.prototype, "aboutCompany", 2);
1658
- __decorateClass([
1659
- (0, import_class_validator17.IsBoolean)({ message: "Service agreement must be boolean" })
1660
- ], UpdateCompanyProfileDto.prototype, "isServiceAgreementSigned", 2);
1661
- __decorateClass([
1662
- (0, import_class_validator17.IsOptional)(),
1663
- (0, import_class_validator17.IsString)({ message: "Company address must be a string." })
1664
- ], UpdateCompanyProfileDto.prototype, "companyAddress", 2);
1665
- __decorateClass([
1666
- (0, import_class_validator17.IsOptional)(),
1667
- (0, import_class_validator17.IsString)({ message: "Phone number must be a string." })
1668
- ], UpdateCompanyProfileDto.prototype, "phoneNumber", 2);
1669
- __decorateClass([
1670
- (0, import_class_validator17.IsOptional)(),
1671
- (0, import_class_validator17.IsArray)({ message: "Skills must be an array of strings." }),
1672
- (0, import_class_validator17.IsString)({ each: true, message: "Each skill must be a string." })
1673
- ], UpdateCompanyProfileDto.prototype, "skills", 2);
1674
- __decorateClass([
1675
- (0, import_class_validator17.IsOptional)(),
1676
- (0, import_class_validator17.IsString)({ message: "Required freelancer must be a string." })
1677
- ], UpdateCompanyProfileDto.prototype, "requiredFreelancer", 2);
1490
+ ], JobApplication.prototype, "interviewCompletedAt", 2);
1678
1491
  __decorateClass([
1679
- (0, import_class_validator17.IsOptional)(),
1680
- (0, import_class_validator17.IsEnum)(KindOfHire, {
1681
- message: `Kind of hiring must be one of: ${Object.values(KindOfHire).join(", ")}`
1492
+ (0, import_typeorm9.Column)({
1493
+ name: "offered_at",
1494
+ type: "timestamp with time zone",
1495
+ nullable: true
1682
1496
  })
1683
- ], UpdateCompanyProfileDto.prototype, "kindOfHiring", 2);
1497
+ ], JobApplication.prototype, "offeredAt", 2);
1684
1498
  __decorateClass([
1685
- (0, import_class_validator17.IsOptional)(),
1686
- (0, import_class_validator17.IsEnum)(ModeOfHire, {
1687
- message: `Mode of hire must be one of: ${Object.values(ModeOfHire).join(", ")}`
1499
+ (0, import_typeorm9.Column)({
1500
+ name: "hired_at",
1501
+ type: "timestamp with time zone",
1502
+ nullable: true
1688
1503
  })
1689
- ], UpdateCompanyProfileDto.prototype, "modeOfHire", 2);
1504
+ ], JobApplication.prototype, "hiredAt", 2);
1690
1505
  __decorateClass([
1691
- (0, import_class_validator17.IsOptional)(),
1692
- (0, import_class_validator17.IsEnum)(FromUsOn, {
1693
- message: `Found us on must be one of: ${Object.values(FromUsOn).join(", ")}`
1506
+ (0, import_typeorm9.Column)({
1507
+ name: "rejected_at",
1508
+ type: "timestamp with time zone",
1509
+ nullable: true
1694
1510
  })
1695
- ], UpdateCompanyProfileDto.prototype, "foundUsOn", 2);
1696
-
1697
- // src/modules/user/client-profile/dto/client-change-password.dto.ts
1698
- var import_class_validator18 = require("class-validator");
1699
- var ClientChangePasswordDto = class {
1700
- };
1511
+ ], JobApplication.prototype, "rejectedAt", 2);
1701
1512
  __decorateClass([
1702
- (0, import_class_validator18.IsNotEmpty)({ message: "Please enter Old Password." }),
1703
- (0, import_class_validator18.IsString)()
1704
- ], ClientChangePasswordDto.prototype, "oldPassword", 2);
1513
+ (0, import_typeorm9.Column)({ name: "rejection_reason", type: "varchar", nullable: true })
1514
+ ], JobApplication.prototype, "rejectionReason", 2);
1705
1515
  __decorateClass([
1706
- (0, import_class_validator18.IsNotEmpty)({ message: "Please enter New Password." }),
1707
- (0, import_class_validator18.IsString)(),
1708
- (0, import_class_validator18.MinLength)(6),
1709
- (0, import_class_validator18.MaxLength)(32),
1710
- (0, import_class_validator18.Matches)(/^(?=.*[A-Za-z])(?=.*\d)(?=.*[@$!%*?&])/, {
1711
- message: "New Password must include letters, numbers and symbols."
1516
+ (0, import_typeorm9.Column)({
1517
+ name: "withdrawn_at",
1518
+ type: "timestamp with time zone",
1519
+ nullable: true
1712
1520
  })
1713
- ], ClientChangePasswordDto.prototype, "newPassword", 2);
1714
-
1715
- // src/modules/question/pattern/pattern.ts
1716
- var QUESTION_PATTERN = {
1717
- fetchQuestions: "fetch.questions"
1718
- };
1521
+ ], JobApplication.prototype, "withdrawnAt", 2);
1522
+ __decorateClass([
1523
+ (0, import_typeorm9.Column)({ name: "withdrawn_reason", type: "varchar", nullable: true })
1524
+ ], JobApplication.prototype, "withdrawnReason", 2);
1525
+ JobApplication = __decorateClass([
1526
+ (0, import_typeorm9.Entity)("job_applications")
1527
+ ], JobApplication);
1719
1528
 
1720
- // src/modules/question/dto/create-question.dto.ts
1721
- var import_class_validator19 = require("class-validator");
1722
- var CreateQuestionDto = class {
1529
+ // src/entities/job.entity.ts
1530
+ var JobLocationEnum = /* @__PURE__ */ ((JobLocationEnum2) => {
1531
+ JobLocationEnum2["ONSITE"] = "ONSITE";
1532
+ JobLocationEnum2["REMOTE"] = "REMOTE";
1533
+ JobLocationEnum2["BOTH"] = "BOTH";
1534
+ return JobLocationEnum2;
1535
+ })(JobLocationEnum || {});
1536
+ var TypeOfEmploymentEnum = /* @__PURE__ */ ((TypeOfEmploymentEnum2) => {
1537
+ TypeOfEmploymentEnum2["FULLTIME"] = "FULLTIME";
1538
+ TypeOfEmploymentEnum2["PARTTIME"] = "PARTTIME";
1539
+ TypeOfEmploymentEnum2["BOTH"] = "BOTH";
1540
+ return TypeOfEmploymentEnum2;
1541
+ })(TypeOfEmploymentEnum || {});
1542
+ var Step = /* @__PURE__ */ ((Step2) => {
1543
+ Step2["BASIC_INFORMATION"] = "BASIC_INFORMATION";
1544
+ Step2["ADDITIONAL_COMMENTS"] = "ADDITIONAL_COMMENTS";
1545
+ Step2["JOB_DESCRIPTION"] = "JOB_DESCRIPTION";
1546
+ return Step2;
1547
+ })(Step || {});
1548
+ var JobStatusEnum = /* @__PURE__ */ ((JobStatusEnum2) => {
1549
+ JobStatusEnum2["ACTIVE"] = "ACTIVE";
1550
+ JobStatusEnum2["OPEN"] = "OPEN";
1551
+ JobStatusEnum2["DRAFT"] = "DRAFT";
1552
+ JobStatusEnum2["ONHOLD"] = "ONHOLD";
1553
+ JobStatusEnum2["CLOSED"] = "CLOSED";
1554
+ return JobStatusEnum2;
1555
+ })(JobStatusEnum || {});
1556
+ var DurationTypeEnum = /* @__PURE__ */ ((DurationTypeEnum2) => {
1557
+ DurationTypeEnum2["DAY"] = "DAY";
1558
+ DurationTypeEnum2["WEEK"] = "WEEK";
1559
+ DurationTypeEnum2["MONTH"] = "MONTH";
1560
+ DurationTypeEnum2["YEAR"] = "YEAR";
1561
+ return DurationTypeEnum2;
1562
+ })(DurationTypeEnum || {});
1563
+ var Job = class extends BaseEntity {
1723
1564
  };
1724
1565
  __decorateClass([
1725
- (0, import_class_validator19.IsNotEmpty)({ message: "Please enter unique id." })
1726
- ], CreateQuestionDto.prototype, "questionId", 2);
1566
+ (0, import_typeorm10.Column)({ name: "job_id", type: "varchar", unique: true, nullable: true })
1567
+ ], Job.prototype, "jobId", 2);
1568
+ // individual index to find jobs by user
1727
1569
  __decorateClass([
1728
- (0, import_class_validator19.IsNotEmpty)({ message: "Please enter question." })
1729
- ], CreateQuestionDto.prototype, "question", 2);
1570
+ (0, import_typeorm10.Column)({ name: "user_id", type: "integer", nullable: true }),
1571
+ (0, import_typeorm10.Index)()
1572
+ ], Job.prototype, "userId", 2);
1730
1573
  __decorateClass([
1731
- (0, import_class_validator19.IsNotEmpty)({ message: "Please enter for whom the question is." })
1732
- ], CreateQuestionDto.prototype, "questionFor", 2);
1574
+ (0, import_typeorm10.ManyToOne)(() => User, (user) => user.jobs),
1575
+ (0, import_typeorm10.JoinColumn)({ name: "user_id" })
1576
+ ], Job.prototype, "user", 2);
1733
1577
  __decorateClass([
1734
- (0, import_class_validator19.IsNotEmpty)({ message: "Please enter options." })
1735
- ], CreateQuestionDto.prototype, "options", 2);
1578
+ (0, import_typeorm10.Column)({ name: "job_role", type: "varchar", nullable: true })
1579
+ ], Job.prototype, "jobRole", 2);
1736
1580
  __decorateClass([
1737
- (0, import_class_validator19.IsOptional)(),
1738
- (0, import_class_validator19.IsBoolean)({ message: "Whether the question status active" })
1739
- ], CreateQuestionDto.prototype, "isActive", 2);
1740
-
1741
- // src/modules/job/pattern/pattern.ts
1742
- var JOB_ROLE_PATTERN = {
1743
- fetchJobRolesForDropdown: "fetch.job.roles.for.dropdown"
1744
- };
1745
- var JOB_PATTERN = {
1746
- fetchJobs: "fetch.jobs",
1747
- fetchJobCountAsPerStatus: "fetch.job.count.as.per.status",
1748
- fetchJobsDropdown: "fetch.jobs.dropdown",
1749
- fetchJobDetail: "fetch.job.details",
1750
- handleJdUpload: "handle.jd.upload",
1751
- fetchJobBasicInformation: "fetch.job.basic.information",
1752
- createJobBasicInformation: "create.job.basic.information",
1753
- updateJobBasicInformation: "update.job.basic.information",
1754
- fetchJobAdditionalComments: "fetch.job.additional.comments",
1755
- updateJobAdditionalComments: "update.job.additional.comments",
1756
- fetchJobDescription: "fetch.job.description",
1757
- updateJobDescription: "update.job.description",
1758
- updateJobStatus: "update.job.status",
1759
- searchJobsByRoleAndSkills: "search.jobs.by.role.and.skills"
1760
- };
1761
-
1762
- // src/modules/job/dto/job-basic-information.dto.ts
1763
- var import_class_validator20 = require("class-validator");
1764
- var import_class_transformer = require("class-transformer");
1765
- var JobLocation = /* @__PURE__ */ ((JobLocation2) => {
1766
- JobLocation2["ONSITE"] = "ONSITE";
1767
- JobLocation2["REMOTE"] = "REMOTE";
1768
- JobLocation2["BOTH"] = "BOTH";
1769
- return JobLocation2;
1770
- })(JobLocation || {});
1771
- var EmploymentType = /* @__PURE__ */ ((EmploymentType2) => {
1772
- EmploymentType2["FULLTIME"] = "FULLTIME";
1773
- EmploymentType2["PARTTIME"] = "PARTTIME";
1774
- EmploymentType2["BOTH"] = "BOTH";
1775
- return EmploymentType2;
1776
- })(EmploymentType || {});
1777
- var JobBasicInformationDto = class {
1778
- };
1581
+ (0, import_typeorm10.Column)({ name: "note", type: "varchar", nullable: true })
1582
+ ], Job.prototype, "note", 2);
1779
1583
  __decorateClass([
1780
- (0, import_class_validator20.IsNotEmpty)({ message: "Please enter job role" }),
1781
- (0, import_class_validator20.IsString)({ message: "Job role must be a string" })
1782
- ], JobBasicInformationDto.prototype, "jobRole", 2);
1584
+ (0, import_typeorm10.Column)({ name: "openings", type: "integer", default: 0 })
1585
+ ], Job.prototype, "openings", 2);
1783
1586
  __decorateClass([
1784
- (0, import_class_validator20.IsOptional)(),
1785
- (0, import_class_validator20.IsString)({ message: "Note must be a string" })
1786
- ], JobBasicInformationDto.prototype, "note", 2);
1587
+ (0, import_typeorm10.Column)({
1588
+ name: "location",
1589
+ type: "enum",
1590
+ enum: JobLocationEnum,
1591
+ nullable: true
1592
+ })
1593
+ ], Job.prototype, "location", 2);
1787
1594
  __decorateClass([
1788
- (0, import_class_validator20.IsArray)({ message: "Skills must be an array" }),
1789
- (0, import_class_validator20.ArrayNotEmpty)({ message: "Please select at least one skill" }),
1790
- (0, import_class_validator20.IsNumber)({}, { each: true, message: "Each skill must be a number" }),
1791
- (0, import_class_transformer.Type)(() => Number)
1792
- ], JobBasicInformationDto.prototype, "skills", 2);
1595
+ (0, import_typeorm10.Column)({
1596
+ name: "type_of_employment",
1597
+ type: "enum",
1598
+ enum: TypeOfEmploymentEnum,
1599
+ nullable: true
1600
+ })
1601
+ ], Job.prototype, "typeOfEmployment", 2);
1793
1602
  __decorateClass([
1794
- (0, import_class_validator20.IsNumber)({}, { message: "Openings must be a number" }),
1795
- (0, import_class_validator20.Min)(1, { message: "There must be at least 1 opening" }),
1796
- (0, import_class_transformer.Type)(() => Number)
1797
- ], JobBasicInformationDto.prototype, "openings", 2);
1603
+ (0, import_typeorm10.Column)({ name: "currency", type: "varchar", default: "USD" })
1604
+ ], Job.prototype, "currency", 2);
1798
1605
  __decorateClass([
1799
- (0, import_class_validator20.IsEnum)(JobLocation, {
1800
- message: `Location must be one of: ${Object.values(JobLocation).join(
1801
- ", "
1802
- )}`
1606
+ (0, import_typeorm10.Column)({
1607
+ name: "expected_salary_from",
1608
+ type: "decimal",
1609
+ precision: 10,
1610
+ scale: 2,
1611
+ default: 0
1803
1612
  })
1804
- ], JobBasicInformationDto.prototype, "location", 2);
1613
+ ], Job.prototype, "expectedSalaryFrom", 2);
1805
1614
  __decorateClass([
1806
- (0, import_class_validator20.IsEnum)(EmploymentType, {
1807
- message: `Type of employment must be one of: ${Object.values(
1808
- EmploymentType
1809
- ).join(", ")}`
1615
+ (0, import_typeorm10.Column)({
1616
+ name: "expected_salary_to",
1617
+ type: "decimal",
1618
+ precision: 10,
1619
+ scale: 2,
1620
+ default: 0
1810
1621
  })
1811
- ], JobBasicInformationDto.prototype, "typeOfEmployment", 2);
1622
+ ], Job.prototype, "expectedSalaryTo", 2);
1812
1623
  __decorateClass([
1813
- (0, import_class_validator20.IsNumber)({}, { message: "Expected salary (from) must be a number" }),
1814
- (0, import_class_validator20.Min)(0, { message: "Expected salary (from) cannot be negative" }),
1815
- (0, import_class_transformer.Type)(() => Number)
1816
- ], JobBasicInformationDto.prototype, "expectedSalaryFrom", 2);
1624
+ (0, import_typeorm10.Column)({ name: "tentative_start_date", type: "date", nullable: true })
1625
+ ], Job.prototype, "tentativeStartDate", 2);
1817
1626
  __decorateClass([
1818
- (0, import_class_validator20.IsNumber)({}, { message: "Expected salary (to) must be a number" }),
1819
- (0, import_class_validator20.Min)(0, { message: "Expected salary (to) cannot be negative" }),
1820
- (0, import_class_transformer.Type)(() => Number)
1821
- ], JobBasicInformationDto.prototype, "expectedSalaryTo", 2);
1627
+ (0, import_typeorm10.Column)({ name: "duration", type: "varchar", nullable: true })
1628
+ ], Job.prototype, "duration", 2);
1822
1629
  __decorateClass([
1823
- (0, import_class_validator20.IsString)({ message: "Onboarding TAT must be a string" }),
1824
- (0, import_class_validator20.IsOptional)()
1825
- ], JobBasicInformationDto.prototype, "onboardingTat", 2);
1630
+ (0, import_typeorm10.Column)({
1631
+ name: "duration_type",
1632
+ type: "enum",
1633
+ enum: DurationTypeEnum,
1634
+ nullable: true
1635
+ })
1636
+ ], Job.prototype, "durationType", 2);
1826
1637
  __decorateClass([
1827
- (0, import_class_validator20.IsString)({ message: "Candidate communication skills must be a string" }),
1828
- (0, import_class_validator20.IsOptional)()
1829
- ], JobBasicInformationDto.prototype, "candidateCommunicationSkills", 2);
1830
-
1831
- // src/modules/job/dto/job-additional-comment.dto.ts
1832
- var import_class_validator21 = require("class-validator");
1833
- var JobAdditionalCommentDto = class {
1834
- };
1638
+ (0, import_typeorm10.Column)({ name: "description", type: "varchar", nullable: true })
1639
+ ], Job.prototype, "description", 2);
1835
1640
  __decorateClass([
1836
- (0, import_class_validator21.IsOptional)(),
1837
- (0, import_class_validator21.IsString)({ message: "Additional comment must be a string" }),
1838
- (0, import_class_validator21.MaxLength)(500, { message: "Additional comment must not exceed 500 characters" })
1839
- ], JobAdditionalCommentDto.prototype, "additionalComment", 2);
1840
-
1841
- // src/modules/job/dto/job-description.dto.ts
1842
- var import_class_validator22 = require("class-validator");
1843
- var JobDescriptionDto = class {
1844
- };
1641
+ (0, import_typeorm10.Column)({ name: "additional_comment", type: "varchar", nullable: true })
1642
+ ], Job.prototype, "additionalComment", 2);
1845
1643
  __decorateClass([
1846
- (0, import_class_validator22.IsNotEmpty)({ message: "Please enter job description" }),
1847
- (0, import_class_validator22.IsString)({ message: "Description must be a string" }),
1848
- (0, import_class_validator22.MaxLength)(5e3, { message: "Description must not exceed 5000 characters" })
1849
- ], JobDescriptionDto.prototype, "description", 2);
1644
+ (0, import_typeorm10.Column)({
1645
+ name: "onboarding_tat",
1646
+ type: "varchar",
1647
+ length: 50,
1648
+ nullable: true
1649
+ })
1650
+ ], Job.prototype, "onboardingTat", 2);
1651
+ __decorateClass([
1652
+ (0, import_typeorm10.Column)({
1653
+ name: "candidate_communication_skills",
1654
+ type: "varchar",
1655
+ nullable: true
1656
+ })
1657
+ ], Job.prototype, "candidateCommunicationSkills", 2);
1658
+ __decorateClass([
1659
+ (0, import_typeorm10.Column)({
1660
+ name: "step_completed",
1661
+ type: "enum",
1662
+ enum: Step,
1663
+ nullable: true
1664
+ })
1665
+ ], Job.prototype, "stepCompleted", 2);
1666
+ __decorateClass([
1667
+ (0, import_typeorm10.Column)({
1668
+ name: "status",
1669
+ type: "enum",
1670
+ enum: JobStatusEnum,
1671
+ default: "DRAFT" /* DRAFT */
1672
+ })
1673
+ ], Job.prototype, "status", 2);
1674
+ __decorateClass([
1675
+ (0, import_typeorm10.OneToMany)(() => JobSkill, (jobSkill) => jobSkill.job, { cascade: true })
1676
+ ], Job.prototype, "jobSkills", 2);
1677
+ __decorateClass([
1678
+ (0, import_typeorm10.OneToMany)(() => JobApplication, (jobApplication) => jobApplication.job, {
1679
+ cascade: true
1680
+ })
1681
+ ], Job.prototype, "jobApplications", 2);
1682
+ Job = __decorateClass([
1683
+ (0, import_typeorm10.Entity)("jobs")
1684
+ ], Job);
1850
1685
 
1851
- // src/modules/job/dto/job-status.dto.ts
1852
- var import_class_validator23 = require("class-validator");
1853
- var JobStatus = /* @__PURE__ */ ((JobStatus2) => {
1854
- JobStatus2["ACTIVE"] = "ACTIVE";
1855
- JobStatus2["OPEN"] = "OPEN";
1856
- JobStatus2["DRAFT"] = "DRAFT";
1857
- JobStatus2["ONHOLD"] = "ONHOLD";
1858
- JobStatus2["CLOSED"] = "CLOSED";
1859
- return JobStatus2;
1860
- })(JobStatus || {});
1861
- var JobStatusDto = class {
1686
+ // src/entities/bank-details.entity.ts
1687
+ var import_typeorm11 = require("typeorm");
1688
+ var BankAccountTypeEnum = /* @__PURE__ */ ((BankAccountTypeEnum2) => {
1689
+ BankAccountTypeEnum2["PRIMARY"] = "PRIMARY";
1690
+ BankAccountTypeEnum2["SECONDARY"] = "SECONDARY";
1691
+ return BankAccountTypeEnum2;
1692
+ })(BankAccountTypeEnum || {});
1693
+ var BankAccountScopeEnum = /* @__PURE__ */ ((BankAccountScopeEnum2) => {
1694
+ BankAccountScopeEnum2["DOMESTIC"] = "DOMESTIC";
1695
+ BankAccountScopeEnum2["INTERNATIONAL"] = "INTERNATIONAL";
1696
+ return BankAccountScopeEnum2;
1697
+ })(BankAccountScopeEnum || {});
1698
+ var BankDetail = class extends BaseEntity {
1862
1699
  };
1700
+ // individual index to find bank details by user
1863
1701
  __decorateClass([
1864
- (0, import_class_validator23.IsNotEmpty)({ message: "Please provide a job status" }),
1865
- (0, import_class_validator23.IsEnum)(JobStatus, {
1866
- message: `Status must be one of: ${Object.values(JobStatus).join(", ")}`
1702
+ (0, import_typeorm11.Column)({ name: "user_id", type: "integer", nullable: true }),
1703
+ (0, import_typeorm11.Index)()
1704
+ ], BankDetail.prototype, "userId", 2);
1705
+ __decorateClass([
1706
+ (0, import_typeorm11.ManyToOne)(() => User, (user) => user.bankDetail),
1707
+ (0, import_typeorm11.JoinColumn)({ name: "user_id" })
1708
+ ], BankDetail.prototype, "user", 2);
1709
+ __decorateClass([
1710
+ (0, import_typeorm11.Column)({ name: "name", type: "varchar", nullable: true })
1711
+ ], BankDetail.prototype, "name", 2);
1712
+ __decorateClass([
1713
+ (0, import_typeorm11.Column)({ name: "mobile", type: "varchar", unique: true, nullable: true })
1714
+ ], BankDetail.prototype, "mobile", 2);
1715
+ __decorateClass([
1716
+ (0, import_typeorm11.Column)({ name: "email", type: "varchar", unique: true })
1717
+ ], BankDetail.prototype, "email", 2);
1718
+ __decorateClass([
1719
+ (0, import_typeorm11.Column)({ name: "address", type: "varchar", nullable: true })
1720
+ ], BankDetail.prototype, "address", 2);
1721
+ __decorateClass([
1722
+ (0, import_typeorm11.Column)({ name: "account_number", type: "varchar", unique: true, nullable: true })
1723
+ ], BankDetail.prototype, "accountNumber", 2);
1724
+ __decorateClass([
1725
+ (0, import_typeorm11.Column)({ name: "bank_name", type: "varchar", nullable: true })
1726
+ ], BankDetail.prototype, "bankName", 2);
1727
+ __decorateClass([
1728
+ (0, import_typeorm11.Column)({ name: "ifsc_code", type: "varchar", nullable: true })
1729
+ ], BankDetail.prototype, "ifscCode", 2);
1730
+ __decorateClass([
1731
+ (0, import_typeorm11.Column)({ name: "branch_name", type: "varchar", nullable: true })
1732
+ ], BankDetail.prototype, "branchName", 2);
1733
+ __decorateClass([
1734
+ (0, import_typeorm11.Column)({ name: "routing_no", type: "varchar", nullable: true })
1735
+ ], BankDetail.prototype, "routingNo", 2);
1736
+ __decorateClass([
1737
+ (0, import_typeorm11.Column)({ name: "aba_no", type: "varchar", nullable: true })
1738
+ ], BankDetail.prototype, "abaNumber", 2);
1739
+ __decorateClass([
1740
+ (0, import_typeorm11.Column)({ name: "iban", type: "varchar", nullable: true })
1741
+ ], BankDetail.prototype, "iban", 2);
1742
+ __decorateClass([
1743
+ (0, import_typeorm11.Column)({
1744
+ name: "account_type",
1745
+ type: "enum",
1746
+ enum: BankAccountTypeEnum,
1747
+ default: "PRIMARY" /* PRIMARY */
1867
1748
  })
1868
- ], JobStatusDto.prototype, "status", 2);
1749
+ ], BankDetail.prototype, "accountType", 2);
1750
+ __decorateClass([
1751
+ (0, import_typeorm11.Column)({
1752
+ name: "account_scope",
1753
+ type: "enum",
1754
+ enum: BankAccountScopeEnum,
1755
+ default: "DOMESTIC" /* DOMESTIC */
1756
+ })
1757
+ ], BankDetail.prototype, "accountScope", 2);
1758
+ BankDetail = __decorateClass([
1759
+ (0, import_typeorm11.Entity)("bank_details")
1760
+ ], BankDetail);
1869
1761
 
1870
- // src/modules/job/dto/job-id-param.dto.ts
1871
- var import_class_validator24 = require("class-validator");
1872
- var JobIdParamDto = class {
1762
+ // src/entities/system-preference.entity.ts
1763
+ var import_typeorm12 = require("typeorm");
1764
+ var SystemPreference = class extends BaseEntity {
1873
1765
  };
1766
+ // individual index to find system preference by user
1874
1767
  __decorateClass([
1875
- (0, import_class_validator24.IsUUID)("4", {
1876
- message: "Invalid job ID. It must be a valid UUID version 4."
1877
- })
1878
- ], JobIdParamDto.prototype, "id", 2);
1768
+ (0, import_typeorm12.Column)({ name: "user_id", type: "integer", nullable: true }),
1769
+ (0, import_typeorm12.Index)()
1770
+ ], SystemPreference.prototype, "userId", 2);
1771
+ __decorateClass([
1772
+ (0, import_typeorm12.ManyToOne)(() => User, (user) => user.systemPreference),
1773
+ (0, import_typeorm12.JoinColumn)({ name: "user_id" })
1774
+ ], SystemPreference.prototype, "user", 2);
1775
+ __decorateClass([
1776
+ (0, import_typeorm12.Column)({ name: "key", type: "varchar", unique: true, nullable: false })
1777
+ ], SystemPreference.prototype, "key", 2);
1778
+ __decorateClass([
1779
+ (0, import_typeorm12.Column)({ name: "value", type: "boolean", default: false })
1780
+ ], SystemPreference.prototype, "value", 2);
1781
+ SystemPreference = __decorateClass([
1782
+ (0, import_typeorm12.Entity)("system_preferences")
1783
+ ], SystemPreference);
1879
1784
 
1880
- // src/modules/user/freelancer-profile/pattern/pattern.ts
1881
- var PROFILE_PATTERN = {
1882
- fetchFreelancerProfile: "fetch.freelancer.profile",
1883
- changeFreelancerPassword: "change.freelancer.password",
1884
- uploadFreelancerProfilePic: "upload.freelancer.profilepic",
1885
- updateFreelancerProfile: "update.freelancer.profile"
1785
+ // src/entities/company-role.entity.ts
1786
+ var import_typeorm13 = require("typeorm");
1787
+ var CompanyRole = class extends BaseEntity {
1886
1788
  };
1789
+ // individual index to find company roles by user
1790
+ __decorateClass([
1791
+ (0, import_typeorm13.Column)({ name: "user_id", type: "integer", nullable: true }),
1792
+ (0, import_typeorm13.Index)()
1793
+ ], CompanyRole.prototype, "userId", 2);
1794
+ __decorateClass([
1795
+ (0, import_typeorm13.ManyToOne)(() => User, (user) => user.companyRole),
1796
+ (0, import_typeorm13.JoinColumn)({ name: "user_id" })
1797
+ ], CompanyRole.prototype, "user", 2);
1798
+ __decorateClass([
1799
+ (0, import_typeorm13.Column)({ name: "name", type: "varchar" })
1800
+ ], CompanyRole.prototype, "name", 2);
1801
+ __decorateClass([
1802
+ (0, import_typeorm13.Column)({ name: "slug", type: "varchar", nullable: true, unique: true }),
1803
+ (0, import_typeorm13.Index)()
1804
+ ], CompanyRole.prototype, "slug", 2);
1805
+ __decorateClass([
1806
+ (0, import_typeorm13.Column)({ name: "description", type: "text", nullable: true })
1807
+ ], CompanyRole.prototype, "description", 2);
1808
+ __decorateClass([
1809
+ (0, import_typeorm13.Column)({ name: "is_active", type: "boolean", default: true })
1810
+ ], CompanyRole.prototype, "isActive", 2);
1811
+ CompanyRole = __decorateClass([
1812
+ (0, import_typeorm13.Entity)("company_roles")
1813
+ ], CompanyRole);
1887
1814
 
1888
- // src/modules/user/freelancer-profile/dto/freelancer-change-password.dto.ts
1889
- var import_class_validator25 = require("class-validator");
1890
- var FreelancerChangePasswordDto = class {
1815
+ // src/entities/freelancer-experience.entity.ts
1816
+ var import_typeorm14 = require("typeorm");
1817
+ var FreelancerExperience = class extends BaseEntity {
1891
1818
  };
1819
+ // individual index to find experence by user
1892
1820
  __decorateClass([
1893
- (0, import_class_validator25.IsNotEmpty)({ message: "Please enter Old Password." }),
1894
- (0, import_class_validator25.IsString)()
1895
- ], FreelancerChangePasswordDto.prototype, "oldPassword", 2);
1821
+ (0, import_typeorm14.Column)({ name: "user_id", type: "integer", nullable: true }),
1822
+ (0, import_typeorm14.Index)()
1823
+ ], FreelancerExperience.prototype, "userId", 2);
1896
1824
  __decorateClass([
1897
- (0, import_class_validator25.IsNotEmpty)({ message: "Please enter New Password." }),
1898
- (0, import_class_validator25.IsString)(),
1899
- (0, import_class_validator25.MinLength)(6),
1900
- (0, import_class_validator25.MaxLength)(32),
1901
- (0, import_class_validator25.Matches)(/^(?=.*[A-Za-z])(?=.*\d)(?=.*[@$!%*?&])/, {
1902
- message: "New Password must include letters, numbers and symbols."
1903
- })
1904
- ], FreelancerChangePasswordDto.prototype, "newPassword", 2);
1825
+ (0, import_typeorm14.ManyToOne)(() => User, (user) => user.freelancerExperience),
1826
+ (0, import_typeorm14.JoinColumn)({ name: "user_id" })
1827
+ ], FreelancerExperience.prototype, "user", 2);
1828
+ __decorateClass([
1829
+ (0, import_typeorm14.Column)({ name: "company_name", type: "varchar", nullable: true })
1830
+ ], FreelancerExperience.prototype, "companyName", 2);
1831
+ __decorateClass([
1832
+ (0, import_typeorm14.Column)({ name: "designation", type: "varchar", nullable: true })
1833
+ ], FreelancerExperience.prototype, "designation", 2);
1834
+ __decorateClass([
1835
+ (0, import_typeorm14.Column)({ name: "job_duration", type: "varchar", nullable: true })
1836
+ ], FreelancerExperience.prototype, "jobDuration", 2);
1837
+ __decorateClass([
1838
+ (0, import_typeorm14.Column)({ name: "description", type: "varchar", nullable: true })
1839
+ ], FreelancerExperience.prototype, "description", 2);
1840
+ FreelancerExperience = __decorateClass([
1841
+ (0, import_typeorm14.Entity)("freelancer_experiences")
1842
+ ], FreelancerExperience);
1905
1843
 
1906
- // src/modules/user/freelancer-profile/dto/update-freelancer-profile.dto.ts
1907
- var import_class_validator26 = require("class-validator");
1908
- var NatureOfWorkDto = /* @__PURE__ */ ((NatureOfWorkDto2) => {
1909
- NatureOfWorkDto2["FULLTIME"] = "FULLTIME";
1910
- NatureOfWorkDto2["PARTTIME"] = "PARTTIME";
1911
- NatureOfWorkDto2["BOTH"] = "BOTH";
1912
- return NatureOfWorkDto2;
1913
- })(NatureOfWorkDto || {});
1914
- var UpdateFreelancerProfileDto = class {
1844
+ // src/entities/user.entity.ts
1845
+ var AccountType = /* @__PURE__ */ ((AccountType2) => {
1846
+ AccountType2["ADMIN"] = "ADMIN";
1847
+ AccountType2["SUB_ADMIN"] = "SUB_ADMIN";
1848
+ AccountType2["CLIENT"] = "CLIENT";
1849
+ AccountType2["FREELANCER"] = "FREELANCER";
1850
+ return AccountType2;
1851
+ })(AccountType || {});
1852
+ var AccountStatus = /* @__PURE__ */ ((AccountStatus2) => {
1853
+ AccountStatus2["INACTIVE"] = "INACTIVE";
1854
+ AccountStatus2["ACTIVE"] = "ACTIVE";
1855
+ AccountStatus2["SUSPENDED"] = "SUSPENDED";
1856
+ AccountStatus2["BLOCKED"] = "BLOCKED";
1857
+ return AccountStatus2;
1858
+ })(AccountStatus || {});
1859
+ var Provider = /* @__PURE__ */ ((Provider2) => {
1860
+ Provider2["LINKEDIN"] = "LINKEDIN";
1861
+ Provider2["GOOGLE"] = "GOOGLE";
1862
+ Provider2["GITLABS"] = "GITLABS";
1863
+ return Provider2;
1864
+ })(Provider || {});
1865
+ var User = class extends BaseEntity {
1915
1866
  };
1916
1867
  __decorateClass([
1917
- (0, import_class_validator26.IsOptional)(),
1918
- (0, import_class_validator26.IsString)()
1919
- ], UpdateFreelancerProfileDto.prototype, "firstName", 2);
1868
+ (0, import_typeorm15.Column)({ name: "unique_id", type: "varchar", unique: true })
1869
+ ], User.prototype, "uniqueId", 2);
1870
+ __decorateClass([
1871
+ (0, import_typeorm15.Column)({ name: "parent_id", type: "integer", nullable: true }),
1872
+ (0, import_typeorm15.Index)()
1873
+ ], User.prototype, "parentId", 2);
1874
+ __decorateClass([
1875
+ (0, import_typeorm15.ManyToOne)(() => User, (user) => user.children, { nullable: true }),
1876
+ (0, import_typeorm15.JoinColumn)({ name: "parent_id" })
1877
+ ], User.prototype, "parent", 2);
1878
+ __decorateClass([
1879
+ (0, import_typeorm15.OneToMany)(() => User, (user) => user.parent)
1880
+ ], User.prototype, "children", 2);
1881
+ __decorateClass([
1882
+ (0, import_typeorm15.Column)({ name: "username", type: "varchar", unique: true, nullable: true })
1883
+ ], User.prototype, "username", 2);
1884
+ __decorateClass([
1885
+ (0, import_typeorm15.Column)({ name: "first_name", type: "varchar", length: 100, nullable: true })
1886
+ ], User.prototype, "firstName", 2);
1887
+ __decorateClass([
1888
+ (0, import_typeorm15.Column)({ name: "last_name", type: "varchar", length: 100, nullable: true })
1889
+ ], User.prototype, "lastName", 2);
1890
+ __decorateClass([
1891
+ (0, import_typeorm15.Column)({ name: "date_of_birth", type: "date", nullable: true })
1892
+ ], User.prototype, "dateOfBirth", 2);
1893
+ __decorateClass([
1894
+ (0, import_typeorm15.Column)({ name: "gender", type: "varchar", length: 10, nullable: true })
1895
+ ], User.prototype, "gender", 2);
1896
+ __decorateClass([
1897
+ (0, import_typeorm15.Column)({ name: "profile_picture_url", type: "text", nullable: true })
1898
+ ], User.prototype, "profilePictureUrl", 2);
1899
+ __decorateClass([
1900
+ (0, import_typeorm15.Column)({ name: "email", type: "varchar", unique: true })
1901
+ ], User.prototype, "email", 2);
1902
+ __decorateClass([
1903
+ (0, import_typeorm15.Column)({ name: "mobile_code", type: "varchar", nullable: true })
1904
+ ], User.prototype, "mobileCode", 2);
1920
1905
  __decorateClass([
1921
- (0, import_class_validator26.IsOptional)(),
1922
- (0, import_class_validator26.IsString)()
1923
- ], UpdateFreelancerProfileDto.prototype, "lastName", 2);
1906
+ (0, import_typeorm15.Column)({ name: "mobile", type: "varchar", unique: true, nullable: true })
1907
+ ], User.prototype, "mobile", 2);
1924
1908
  __decorateClass([
1925
- (0, import_class_validator26.IsOptional)(),
1926
- (0, import_class_validator26.IsEmail)()
1927
- ], UpdateFreelancerProfileDto.prototype, "email", 2);
1909
+ (0, import_typeorm15.Column)({ name: "password", type: "varchar" })
1910
+ ], User.prototype, "password", 2);
1928
1911
  __decorateClass([
1929
- (0, import_class_validator26.IsOptional)(),
1930
- (0, import_class_validator26.IsString)()
1931
- ], UpdateFreelancerProfileDto.prototype, "mobile", 2);
1912
+ (0, import_typeorm15.Column)({
1913
+ name: "account_type",
1914
+ type: "enum",
1915
+ enum: AccountType,
1916
+ default: "FREELANCER" /* FREELANCER */
1917
+ })
1918
+ ], User.prototype, "accountType", 2);
1932
1919
  __decorateClass([
1933
- (0, import_class_validator26.IsOptional)(),
1934
- (0, import_class_validator26.IsNumber)()
1935
- ], UpdateFreelancerProfileDto.prototype, "countryId", 2);
1920
+ (0, import_typeorm15.Column)({
1921
+ name: "account_status",
1922
+ type: "enum",
1923
+ enum: AccountStatus,
1924
+ default: "INACTIVE" /* INACTIVE */
1925
+ })
1926
+ ], User.prototype, "accountStatus", 2);
1936
1927
  __decorateClass([
1937
- (0, import_class_validator26.IsOptional)(),
1938
- (0, import_class_validator26.IsString)()
1939
- ], UpdateFreelancerProfileDto.prototype, "currency", 2);
1928
+ (0, import_typeorm15.Column)({ name: "is_email_verified", type: "boolean", default: false })
1929
+ ], User.prototype, "isEmailVerified", 2);
1940
1930
  __decorateClass([
1941
- (0, import_class_validator26.IsOptional)(),
1942
- (0, import_class_validator26.IsString)()
1943
- ], UpdateFreelancerProfileDto.prototype, "expectedHourlyCompensation", 2);
1931
+ (0, import_typeorm15.Column)({ name: "is_mobile_verified", type: "boolean", default: false })
1932
+ ], User.prototype, "isMobileVerified", 2);
1944
1933
  __decorateClass([
1945
- (0, import_class_validator26.IsOptional)(),
1946
- (0, import_class_validator26.IsEnum)(NatureOfWorkDto, {
1947
- message: `Engagement Type must be one of: ${Object.values(NatureOfWorkDto).join(", ")}`
1934
+ (0, import_typeorm15.Column)({
1935
+ name: "last_login_at",
1936
+ type: "timestamp with time zone",
1937
+ nullable: true
1948
1938
  })
1949
- ], UpdateFreelancerProfileDto.prototype, "natureOfWork", 2);
1939
+ ], User.prototype, "lastLoginAt", 2);
1950
1940
  __decorateClass([
1951
- (0, import_class_validator26.IsOptional)(),
1952
- (0, import_class_validator26.IsString)()
1953
- ], UpdateFreelancerProfileDto.prototype, "portfolioLink", 2);
1941
+ (0, import_typeorm15.Column)({ name: "last_login_ip", type: "varchar", nullable: true })
1942
+ ], User.prototype, "lastLoginIp", 2);
1954
1943
  __decorateClass([
1955
- (0, import_class_validator26.IsOptional)(),
1956
- (0, import_class_validator26.IsString)()
1957
- ], UpdateFreelancerProfileDto.prototype, "address", 2);
1944
+ (0, import_typeorm15.Column)({ name: "reset_token", type: "varchar", nullable: true })
1945
+ ], User.prototype, "resetToken", 2);
1958
1946
  __decorateClass([
1959
- (0, import_class_validator26.IsOptional)(),
1960
- (0, import_class_validator26.IsString)()
1961
- ], UpdateFreelancerProfileDto.prototype, "about", 2);
1947
+ (0, import_typeorm15.Column)({
1948
+ name: "reset_token_expire_at",
1949
+ type: "timestamp with time zone",
1950
+ nullable: true
1951
+ })
1952
+ ], User.prototype, "resetTokenExpireAt", 2);
1962
1953
  __decorateClass([
1963
- (0, import_class_validator26.IsOptional)(),
1964
- (0, import_class_validator26.IsString)()
1965
- ], UpdateFreelancerProfileDto.prototype, "linkedinProfileLink", 2);
1954
+ (0, import_typeorm15.OneToMany)(() => RefreshToken, (token) => token.user)
1955
+ ], User.prototype, "refreshTokens", 2);
1966
1956
  __decorateClass([
1967
- (0, import_class_validator26.IsOptional)(),
1968
- (0, import_class_validator26.IsString)()
1969
- ], UpdateFreelancerProfileDto.prototype, "kaggleProfileLink", 2);
1957
+ (0, import_typeorm15.Column)({
1958
+ name: "provider",
1959
+ type: "enum",
1960
+ enum: Provider,
1961
+ default: null,
1962
+ nullable: true
1963
+ })
1964
+ ], User.prototype, "provider", 2);
1970
1965
  __decorateClass([
1971
- (0, import_class_validator26.IsOptional)(),
1972
- (0, import_class_validator26.IsString)()
1973
- ], UpdateFreelancerProfileDto.prototype, "githubProfileLink", 2);
1966
+ (0, import_typeorm15.Column)({ name: "provider_token", type: "varchar", nullable: true })
1967
+ ], User.prototype, "providerToken", 2);
1974
1968
  __decorateClass([
1975
- (0, import_class_validator26.IsOptional)(),
1976
- (0, import_class_validator26.IsString)()
1977
- ], UpdateFreelancerProfileDto.prototype, "stackOverflowProfileLink", 2);
1978
-
1979
- // src/modules/bank/pattern/pattern.ts
1980
- var BANK_PATTERN = {
1981
- addFreelancerBankDetails: "add.freelancer.bankdetails",
1982
- fetchFreelancerBankDetails: "fetch.freelancer.bank.details",
1983
- updateFreelancerBankDetails: "update.freelancer.bank.details"
1984
- };
1985
-
1986
- // src/modules/bank/dto/freelancer-bank-details.dto.ts
1987
- var import_class_validator27 = require("class-validator");
1988
- var BankAccountScope = /* @__PURE__ */ ((BankAccountScope2) => {
1989
- BankAccountScope2["DOMESTIC"] = "DOMESTIC";
1990
- BankAccountScope2["INTERNATIONAL"] = "INTERNATIONAL";
1991
- return BankAccountScope2;
1992
- })(BankAccountScope || {});
1993
- var FreelancerBankDetailsDto = class {
1994
- };
1969
+ (0, import_typeorm15.Column)({ name: "linkedin_id", type: "varchar", nullable: true })
1970
+ ], User.prototype, "linkedInId", 2);
1995
1971
  __decorateClass([
1996
- (0, import_class_validator27.IsNotEmpty)({ message: "Please enter Account Holder Name." })
1997
- ], FreelancerBankDetailsDto.prototype, "name", 2);
1972
+ (0, import_typeorm15.Column)({ name: "google_id", type: "varchar", nullable: true })
1973
+ ], User.prototype, "googleId", 2);
1998
1974
  __decorateClass([
1999
- (0, import_class_validator27.IsNotEmpty)({ message: "Please enter Mobile Number." })
2000
- ], FreelancerBankDetailsDto.prototype, "mobile", 2);
1975
+ (0, import_typeorm15.Column)({ name: "gitlabs_id", type: "varchar", nullable: true })
1976
+ ], User.prototype, "gitLabsId", 2);
2001
1977
  __decorateClass([
2002
- (0, import_class_validator27.IsNotEmpty)({ message: "Please enter Email." })
2003
- ], FreelancerBankDetailsDto.prototype, "email", 2);
1978
+ (0, import_typeorm15.OneToMany)(() => Otp, (otp) => otp.user)
1979
+ ], User.prototype, "otps", 2);
2004
1980
  __decorateClass([
2005
- (0, import_class_validator27.IsOptional)()
2006
- ], FreelancerBankDetailsDto.prototype, "address", 2);
1981
+ (0, import_typeorm15.OneToMany)(() => SenseloafLog, (senseloafLog) => senseloafLog.user)
1982
+ ], User.prototype, "senseloafLogs", 2);
2007
1983
  __decorateClass([
2008
- (0, import_class_validator27.IsNotEmpty)({ message: "Please enter Account Number." })
2009
- ], FreelancerBankDetailsDto.prototype, "accountNumber", 2);
1984
+ (0, import_typeorm15.OneToOne)(
1985
+ () => FreelancerProfile,
1986
+ (freelancerProfile) => freelancerProfile.user
1987
+ )
1988
+ ], User.prototype, "freelancerProfile", 2);
2010
1989
  __decorateClass([
2011
- (0, import_class_validator27.IsNotEmpty)({ message: "Please enter Bank Name." })
2012
- ], FreelancerBankDetailsDto.prototype, "bankName", 2);
1990
+ (0, import_typeorm15.OneToOne)(() => CompanyProfile, (companyProfile) => companyProfile.user, { cascade: true })
1991
+ ], User.prototype, "companyProfile", 2);
2013
1992
  __decorateClass([
2014
- (0, import_class_validator27.IsNotEmpty)({ message: "Please enter Branch Name." })
2015
- ], FreelancerBankDetailsDto.prototype, "branchName", 2);
1993
+ (0, import_typeorm15.OneToMany)(() => Job, (job) => job.user)
1994
+ ], User.prototype, "jobs", 2);
2016
1995
  __decorateClass([
2017
- (0, import_class_validator27.ValidateIf)((dto) => dto.accountScope === "DOMESTIC"),
2018
- (0, import_class_validator27.IsNotEmpty)({ message: "IFSC Code is required for DOMESTIC accounts." })
2019
- ], FreelancerBankDetailsDto.prototype, "ifscCode", 2);
1996
+ (0, import_typeorm15.OneToMany)(() => BankDetail, (bankDetail) => bankDetail.user)
1997
+ ], User.prototype, "bankDetail", 2);
2020
1998
  __decorateClass([
2021
- (0, import_class_validator27.ValidateIf)((dto) => dto.accountScope === "INTERNATIONAL"),
2022
- (0, import_class_validator27.IsNotEmpty)({ message: "Routing Number/Sort Code is required for INTERNATIONAL accounts." })
2023
- ], FreelancerBankDetailsDto.prototype, "routingNo", 2);
1999
+ (0, import_typeorm15.OneToMany)(
2000
+ () => SystemPreference,
2001
+ (systemPreference) => systemPreference.user
2002
+ )
2003
+ ], User.prototype, "systemPreference", 2);
2024
2004
  __decorateClass([
2025
- (0, import_class_validator27.ValidateIf)((dto) => dto.accountScope === "INTERNATIONAL"),
2026
- (0, import_class_validator27.IsNotEmpty)({ message: "ABA Number is required for INTERNATIONAL accounts." })
2027
- ], FreelancerBankDetailsDto.prototype, "abaNumber", 2);
2005
+ (0, import_typeorm15.OneToMany)(() => Rating, (rating) => rating.reviewer)
2006
+ ], User.prototype, "givenRatings", 2);
2028
2007
  __decorateClass([
2029
- (0, import_class_validator27.ValidateIf)((dto) => dto.accountScope === "INTERNATIONAL"),
2030
- (0, import_class_validator27.IsNotEmpty)({ message: "IBAN is required for INTERNATIONAL accounts." })
2031
- ], FreelancerBankDetailsDto.prototype, "iban", 2);
2008
+ (0, import_typeorm15.OneToMany)(() => Rating, (rating) => rating.reviewee)
2009
+ ], User.prototype, "receivedRatings", 2);
2032
2010
  __decorateClass([
2033
- (0, import_class_validator27.IsOptional)()
2034
- ], FreelancerBankDetailsDto.prototype, "accountType", 2);
2011
+ (0, import_typeorm15.OneToMany)(() => JobApplication, (jobApplication) => jobApplication.user)
2012
+ ], User.prototype, "jobApplications", 2);
2035
2013
  __decorateClass([
2036
- (0, import_class_validator27.IsEnum)(BankAccountScope, {
2037
- message: `Type of Account Scope must be one of: ${Object.values(
2038
- BankAccountScope
2039
- ).join(", ")}`
2040
- })
2041
- ], FreelancerBankDetailsDto.prototype, "accountScope", 2);
2042
-
2043
- // src/modules/plan/pattern/pattern.ts
2044
- var PLAN_PATTERN = {
2045
- fetchPlans: "fetch.plans"
2046
- };
2047
-
2048
- // src/modules/system-preference/pattern/pattern.ts
2049
- var SYSTEM_PREFERENCES_PATTERN = {
2050
- fetchSystemPreference: "fetch.system.preferences",
2051
- updateSystemPreference: "update.system.preferences",
2052
- createSystemPreference: "create.system.preferences"
2053
- };
2014
+ (0, import_typeorm15.OneToMany)(() => CompanyRole, (companyRole) => companyRole.user)
2015
+ ], User.prototype, "companyRole", 2);
2016
+ __decorateClass([
2017
+ (0, import_typeorm15.OneToOne)(() => FreelancerExperience, (freelancerExperience) => freelancerExperience.user)
2018
+ ], User.prototype, "freelancerExperience", 2);
2019
+ User = __decorateClass([
2020
+ (0, import_typeorm15.Entity)("users")
2021
+ ], User);
2054
2022
 
2055
- // src/modules/system-preference/dto/system-preference.dto.ts
2056
- var import_class_validator28 = require("class-validator");
2057
- var SystemPreferenceKey = /* @__PURE__ */ ((SystemPreferenceKey2) => {
2058
- SystemPreferenceKey2["EMAIL_NOTIFICATION"] = "EMAIL_NOTIFICATION";
2059
- SystemPreferenceKey2["DARK_MODE"] = "DARK_MODE";
2060
- return SystemPreferenceKey2;
2061
- })(SystemPreferenceKey || {});
2062
- var SystemPreferenceDto = class {
2023
+ // src/entities/rating.entity.ts
2024
+ var RatingTypeEnum = /* @__PURE__ */ ((RatingTypeEnum2) => {
2025
+ RatingTypeEnum2["FREELANCER_TO_CLIENT"] = "FREELANCER_TO_CLIENT";
2026
+ RatingTypeEnum2["CLIENT_TO_FREELANCER"] = "CLIENT_TO_FREELANCER";
2027
+ return RatingTypeEnum2;
2028
+ })(RatingTypeEnum || {});
2029
+ var Rating = class extends BaseEntity {
2063
2030
  };
2064
2031
  __decorateClass([
2065
- (0, import_class_validator28.IsBoolean)()
2066
- ], SystemPreferenceDto.prototype, "value", 2);
2032
+ (0, import_typeorm16.Column)({ name: "reviewer_id", type: "integer" }),
2033
+ (0, import_typeorm16.Index)()
2034
+ ], Rating.prototype, "reviewer_id", 2);
2067
2035
  __decorateClass([
2068
- (0, import_class_validator28.IsEnum)(SystemPreferenceKey, {
2069
- message: `key must be one of: ${Object.values(
2070
- SystemPreferenceKey
2071
- ).join(", ")}`
2036
+ (0, import_typeorm16.ManyToOne)(() => User, { onDelete: "CASCADE" }),
2037
+ (0, import_typeorm16.JoinColumn)({ name: "reviewer_id" })
2038
+ ], Rating.prototype, "reviewer", 2);
2039
+ __decorateClass([
2040
+ (0, import_typeorm16.Column)({ name: "reviewee_id", type: "integer" }),
2041
+ (0, import_typeorm16.Index)()
2042
+ ], Rating.prototype, "reviewee_id", 2);
2043
+ __decorateClass([
2044
+ (0, import_typeorm16.ManyToOne)(() => User, { onDelete: "CASCADE" }),
2045
+ (0, import_typeorm16.JoinColumn)({ name: "reviewee_id" })
2046
+ ], Rating.prototype, "reviewee", 2);
2047
+ __decorateClass([
2048
+ (0, import_typeorm16.Column)({
2049
+ type: "enum",
2050
+ enum: RatingTypeEnum,
2051
+ nullable: true
2072
2052
  })
2073
- ], SystemPreferenceDto.prototype, "key", 2);
2074
-
2075
- // src/modules/notification/pattern/pattern.ts
2076
- var NOTIFICATION_PATTERN = {
2077
- handleAccountVerificationNotification: "handle.account.verification.notification",
2078
- handleResetLinkNotification: "handle.reset.link.notification"
2079
- };
2080
-
2081
- // src/modules/rating/pattern/pattern.ts
2082
- var RATING_PATTERN = {
2083
- addRating: "add.rating",
2084
- fetchRating: "fetch.rating"
2085
- };
2053
+ ], Rating.prototype, "ratingType", 2);
2054
+ __decorateClass([
2055
+ (0, import_typeorm16.Column)({ type: "integer", nullable: true })
2056
+ ], Rating.prototype, "rating", 2);
2057
+ __decorateClass([
2058
+ (0, import_typeorm16.Column)({ type: "text", nullable: true })
2059
+ ], Rating.prototype, "review", 2);
2060
+ Rating = __decorateClass([
2061
+ (0, import_typeorm16.Entity)("ratings")
2062
+ ], Rating);
2086
2063
 
2087
2064
  // src/modules/rating/dto/add.rating.dto.ts
2088
- var import_class_validator29 = require("class-validator");
2089
2065
  var CreateRatingDto = class {
2090
2066
  };
2091
2067
  __decorateClass([