@the-inkwell/shared 0.2.20 → 0.2.21
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/README.md +0 -0
- package/dist/constants.d.ts +18 -0
- package/dist/constants.js +7 -1
- package/dist/constants.js.map +1 -1
- package/dist/schema/admin/clients/index.d.ts +250 -0
- package/dist/schema/admin/partners/index.d.ts +70 -0
- package/dist/schema/admin/positions/index.d.ts +35 -0
- package/dist/schema/core.d.ts +229 -0
- package/dist/schema/core.js +55 -3
- package/dist/schema/core.js.map +1 -1
- package/package.json +1 -1
package/dist/schema/core.d.ts
CHANGED
|
@@ -18,6 +18,7 @@ export declare const MessageStatuses: import("drizzle-orm/pg-core").PgEnum<["DEL
|
|
|
18
18
|
export declare const PersonSources: import("drizzle-orm/pg-core").PgEnum<["NETWORK" | "WEBSITE" | "SOCIAL_MEDIA" | "SOURCED"]>;
|
|
19
19
|
export declare const PositionClosedReasons: import("drizzle-orm/pg-core").PgEnum<["PLACED" | "CLIENT_FILLED" | "CLIENT_CANCELED" | "INKWELL_CANCELED"]>;
|
|
20
20
|
export declare const ReferralSources: import("drizzle-orm/pg-core").PgEnum<["CAMPAIGN" | "NETWORK" | "WEBSITE" | "SOCIAL_MEDIA"]>;
|
|
21
|
+
export declare const ClientSources: import("drizzle-orm/pg-core").PgEnum<["NETWORK" | "WEBSITE" | "SOCIAL_MEDIA" | "SOURCED"]>;
|
|
21
22
|
export declare const States: import("drizzle-orm/pg-core").PgEnum<["AL" | "AK" | "AS" | "AZ" | "AR" | "CA" | "CO" | "CT" | "DE" | "DC" | "FM" | "FL" | "GA" | "GU" | "HI" | "ID" | "IL" | "IN" | "IA" | "KS" | "KY" | "LA" | "ME" | "MH" | "MD" | "MA" | "MI" | "MN" | "MS" | "MO" | "MT" | "NE" | "NV" | "NH" | "NJ" | "NM" | "NY" | "NC" | "ND" | "MP" | "OH" | "OK" | "OR" | "PW" | "PA" | "PR" | "RI" | "SC" | "SD" | "TN" | "TX" | "UT" | "VT" | "VI" | "VA" | "WA" | "WV" | "WI" | "WY" | "AB" | "BC" | "MB" | "NB" | "NL" | "NS" | "NT" | "NU" | "ON" | "PE" | "QC" | "SK" | "YT"]>;
|
|
22
23
|
export declare const action: import("drizzle-orm/pg-core").PgTableWithColumns<{
|
|
23
24
|
name: "actions";
|
|
@@ -556,6 +557,125 @@ export declare const client: import("drizzle-orm/pg-core").PgTableWithColumns<{
|
|
|
556
557
|
identity: undefined;
|
|
557
558
|
generated: undefined;
|
|
558
559
|
}, {}, {}>;
|
|
560
|
+
website: import("drizzle-orm/pg-core").PgColumn<{
|
|
561
|
+
name: "website";
|
|
562
|
+
tableName: "clients";
|
|
563
|
+
dataType: "string";
|
|
564
|
+
columnType: "PgText";
|
|
565
|
+
data: string;
|
|
566
|
+
driverParam: string;
|
|
567
|
+
notNull: false;
|
|
568
|
+
hasDefault: false;
|
|
569
|
+
isPrimaryKey: false;
|
|
570
|
+
isAutoincrement: false;
|
|
571
|
+
hasRuntimeDefault: false;
|
|
572
|
+
enumValues: [string, ...string[]];
|
|
573
|
+
baseColumn: never;
|
|
574
|
+
identity: undefined;
|
|
575
|
+
generated: undefined;
|
|
576
|
+
}, {}, {}>;
|
|
577
|
+
referralFee: import("drizzle-orm/pg-core").PgColumn<{
|
|
578
|
+
name: "referralFee";
|
|
579
|
+
tableName: "clients";
|
|
580
|
+
dataType: "number";
|
|
581
|
+
columnType: "PgInteger";
|
|
582
|
+
data: number;
|
|
583
|
+
driverParam: string | number;
|
|
584
|
+
notNull: false;
|
|
585
|
+
hasDefault: false;
|
|
586
|
+
isPrimaryKey: false;
|
|
587
|
+
isAutoincrement: false;
|
|
588
|
+
hasRuntimeDefault: false;
|
|
589
|
+
enumValues: undefined;
|
|
590
|
+
baseColumn: never;
|
|
591
|
+
identity: undefined;
|
|
592
|
+
generated: undefined;
|
|
593
|
+
}, {}, {}>;
|
|
594
|
+
referralFeePercentage: import("drizzle-orm/pg-core").PgColumn<{
|
|
595
|
+
name: "referralFeePercentage";
|
|
596
|
+
tableName: "clients";
|
|
597
|
+
dataType: "number";
|
|
598
|
+
columnType: "PgDoublePrecision";
|
|
599
|
+
data: number;
|
|
600
|
+
driverParam: string | number;
|
|
601
|
+
notNull: true;
|
|
602
|
+
hasDefault: true;
|
|
603
|
+
isPrimaryKey: false;
|
|
604
|
+
isAutoincrement: false;
|
|
605
|
+
hasRuntimeDefault: false;
|
|
606
|
+
enumValues: undefined;
|
|
607
|
+
baseColumn: never;
|
|
608
|
+
identity: undefined;
|
|
609
|
+
generated: undefined;
|
|
610
|
+
}, {}, {}>;
|
|
611
|
+
retainerFee: import("drizzle-orm/pg-core").PgColumn<{
|
|
612
|
+
name: "retainerFee";
|
|
613
|
+
tableName: "clients";
|
|
614
|
+
dataType: "number";
|
|
615
|
+
columnType: "PgInteger";
|
|
616
|
+
data: number;
|
|
617
|
+
driverParam: string | number;
|
|
618
|
+
notNull: false;
|
|
619
|
+
hasDefault: false;
|
|
620
|
+
isPrimaryKey: false;
|
|
621
|
+
isAutoincrement: false;
|
|
622
|
+
hasRuntimeDefault: false;
|
|
623
|
+
enumValues: undefined;
|
|
624
|
+
baseColumn: never;
|
|
625
|
+
identity: undefined;
|
|
626
|
+
generated: undefined;
|
|
627
|
+
}, {}, {}>;
|
|
628
|
+
recruitingSearchFee: import("drizzle-orm/pg-core").PgColumn<{
|
|
629
|
+
name: "recruitingSearchFee";
|
|
630
|
+
tableName: "clients";
|
|
631
|
+
dataType: "number";
|
|
632
|
+
columnType: "PgInteger";
|
|
633
|
+
data: number;
|
|
634
|
+
driverParam: string | number;
|
|
635
|
+
notNull: false;
|
|
636
|
+
hasDefault: false;
|
|
637
|
+
isPrimaryKey: false;
|
|
638
|
+
isAutoincrement: false;
|
|
639
|
+
hasRuntimeDefault: false;
|
|
640
|
+
enumValues: undefined;
|
|
641
|
+
baseColumn: never;
|
|
642
|
+
identity: undefined;
|
|
643
|
+
generated: undefined;
|
|
644
|
+
}, {}, {}>;
|
|
645
|
+
staffingSearchFee: import("drizzle-orm/pg-core").PgColumn<{
|
|
646
|
+
name: "staffingSearchFee";
|
|
647
|
+
tableName: "clients";
|
|
648
|
+
dataType: "number";
|
|
649
|
+
columnType: "PgInteger";
|
|
650
|
+
data: number;
|
|
651
|
+
driverParam: string | number;
|
|
652
|
+
notNull: false;
|
|
653
|
+
hasDefault: false;
|
|
654
|
+
isPrimaryKey: false;
|
|
655
|
+
isAutoincrement: false;
|
|
656
|
+
hasRuntimeDefault: false;
|
|
657
|
+
enumValues: undefined;
|
|
658
|
+
baseColumn: never;
|
|
659
|
+
identity: undefined;
|
|
660
|
+
generated: undefined;
|
|
661
|
+
}, {}, {}>;
|
|
662
|
+
source: import("drizzle-orm/pg-core").PgColumn<{
|
|
663
|
+
name: "source";
|
|
664
|
+
tableName: "clients";
|
|
665
|
+
dataType: "string";
|
|
666
|
+
columnType: "PgEnumColumn";
|
|
667
|
+
data: "NETWORK" | "WEBSITE" | "SOCIAL_MEDIA" | "SOURCED";
|
|
668
|
+
driverParam: string;
|
|
669
|
+
notNull: false;
|
|
670
|
+
hasDefault: false;
|
|
671
|
+
isPrimaryKey: false;
|
|
672
|
+
isAutoincrement: false;
|
|
673
|
+
hasRuntimeDefault: false;
|
|
674
|
+
enumValues: ["NETWORK" | "WEBSITE" | "SOCIAL_MEDIA" | "SOURCED"];
|
|
675
|
+
baseColumn: never;
|
|
676
|
+
identity: undefined;
|
|
677
|
+
generated: undefined;
|
|
678
|
+
}, {}, {}>;
|
|
559
679
|
status: import("drizzle-orm/pg-core").PgColumn<{
|
|
560
680
|
name: "status";
|
|
561
681
|
tableName: "clients";
|
|
@@ -627,6 +747,64 @@ export declare const client: import("drizzle-orm/pg-core").PgTableWithColumns<{
|
|
|
627
747
|
};
|
|
628
748
|
dialect: "pg";
|
|
629
749
|
}>;
|
|
750
|
+
export declare const clientToIndustry: import("drizzle-orm/pg-core").PgTableWithColumns<{
|
|
751
|
+
name: "clients_to_industries";
|
|
752
|
+
schema: undefined;
|
|
753
|
+
columns: {
|
|
754
|
+
clientId: import("drizzle-orm/pg-core").PgColumn<{
|
|
755
|
+
name: "clientId";
|
|
756
|
+
tableName: "clients_to_industries";
|
|
757
|
+
dataType: "string";
|
|
758
|
+
columnType: "PgUUID";
|
|
759
|
+
data: string;
|
|
760
|
+
driverParam: string;
|
|
761
|
+
notNull: true;
|
|
762
|
+
hasDefault: false;
|
|
763
|
+
isPrimaryKey: false;
|
|
764
|
+
isAutoincrement: false;
|
|
765
|
+
hasRuntimeDefault: false;
|
|
766
|
+
enumValues: undefined;
|
|
767
|
+
baseColumn: never;
|
|
768
|
+
identity: undefined;
|
|
769
|
+
generated: undefined;
|
|
770
|
+
}, {}, {}>;
|
|
771
|
+
industryId: import("drizzle-orm/pg-core").PgColumn<{
|
|
772
|
+
name: "industryId";
|
|
773
|
+
tableName: "clients_to_industries";
|
|
774
|
+
dataType: "string";
|
|
775
|
+
columnType: "PgUUID";
|
|
776
|
+
data: string;
|
|
777
|
+
driverParam: string;
|
|
778
|
+
notNull: true;
|
|
779
|
+
hasDefault: false;
|
|
780
|
+
isPrimaryKey: false;
|
|
781
|
+
isAutoincrement: false;
|
|
782
|
+
hasRuntimeDefault: false;
|
|
783
|
+
enumValues: undefined;
|
|
784
|
+
baseColumn: never;
|
|
785
|
+
identity: undefined;
|
|
786
|
+
generated: undefined;
|
|
787
|
+
}, {}, {}>;
|
|
788
|
+
createdAt: import("drizzle-orm/pg-core").PgColumn<{
|
|
789
|
+
name: "createdAt";
|
|
790
|
+
tableName: "clients_to_industries";
|
|
791
|
+
dataType: "date";
|
|
792
|
+
columnType: "PgTimestamp";
|
|
793
|
+
data: Date;
|
|
794
|
+
driverParam: string;
|
|
795
|
+
notNull: true;
|
|
796
|
+
hasDefault: true;
|
|
797
|
+
isPrimaryKey: false;
|
|
798
|
+
isAutoincrement: false;
|
|
799
|
+
hasRuntimeDefault: false;
|
|
800
|
+
enumValues: undefined;
|
|
801
|
+
baseColumn: never;
|
|
802
|
+
identity: undefined;
|
|
803
|
+
generated: undefined;
|
|
804
|
+
}, {}, {}>;
|
|
805
|
+
};
|
|
806
|
+
dialect: "pg";
|
|
807
|
+
}>;
|
|
630
808
|
export declare const campaign: import("drizzle-orm/pg-core").PgTableWithColumns<{
|
|
631
809
|
name: "campaigns";
|
|
632
810
|
schema: undefined;
|
|
@@ -3264,6 +3442,40 @@ export declare const partner: import("drizzle-orm/pg-core").PgTableWithColumns<{
|
|
|
3264
3442
|
identity: undefined;
|
|
3265
3443
|
generated: undefined;
|
|
3266
3444
|
}, {}, {}>;
|
|
3445
|
+
primaryContact: import("drizzle-orm/pg-core").PgColumn<{
|
|
3446
|
+
name: "primaryContact";
|
|
3447
|
+
tableName: "partners";
|
|
3448
|
+
dataType: "string";
|
|
3449
|
+
columnType: "PgUUID";
|
|
3450
|
+
data: string;
|
|
3451
|
+
driverParam: string;
|
|
3452
|
+
notNull: false;
|
|
3453
|
+
hasDefault: false;
|
|
3454
|
+
isPrimaryKey: false;
|
|
3455
|
+
isAutoincrement: false;
|
|
3456
|
+
hasRuntimeDefault: false;
|
|
3457
|
+
enumValues: undefined;
|
|
3458
|
+
baseColumn: never;
|
|
3459
|
+
identity: undefined;
|
|
3460
|
+
generated: undefined;
|
|
3461
|
+
}, {}, {}>;
|
|
3462
|
+
secondaryContact: import("drizzle-orm/pg-core").PgColumn<{
|
|
3463
|
+
name: "secondaryContact";
|
|
3464
|
+
tableName: "partners";
|
|
3465
|
+
dataType: "string";
|
|
3466
|
+
columnType: "PgUUID";
|
|
3467
|
+
data: string;
|
|
3468
|
+
driverParam: string;
|
|
3469
|
+
notNull: false;
|
|
3470
|
+
hasDefault: false;
|
|
3471
|
+
isPrimaryKey: false;
|
|
3472
|
+
isAutoincrement: false;
|
|
3473
|
+
hasRuntimeDefault: false;
|
|
3474
|
+
enumValues: undefined;
|
|
3475
|
+
baseColumn: never;
|
|
3476
|
+
identity: undefined;
|
|
3477
|
+
generated: undefined;
|
|
3478
|
+
}, {}, {}>;
|
|
3267
3479
|
deletedAt: import("drizzle-orm/pg-core").PgColumn<{
|
|
3268
3480
|
name: "deletedAt";
|
|
3269
3481
|
tableName: "partners";
|
|
@@ -4694,6 +4906,23 @@ export declare const position: import("drizzle-orm/pg-core").PgTableWithColumns<
|
|
|
4694
4906
|
identity: undefined;
|
|
4695
4907
|
generated: undefined;
|
|
4696
4908
|
}, {}, {}>;
|
|
4909
|
+
isPriority: import("drizzle-orm/pg-core").PgColumn<{
|
|
4910
|
+
name: "isPriority";
|
|
4911
|
+
tableName: "positions";
|
|
4912
|
+
dataType: "boolean";
|
|
4913
|
+
columnType: "PgBoolean";
|
|
4914
|
+
data: boolean;
|
|
4915
|
+
driverParam: boolean;
|
|
4916
|
+
notNull: true;
|
|
4917
|
+
hasDefault: true;
|
|
4918
|
+
isPrimaryKey: false;
|
|
4919
|
+
isAutoincrement: false;
|
|
4920
|
+
hasRuntimeDefault: false;
|
|
4921
|
+
enumValues: undefined;
|
|
4922
|
+
baseColumn: never;
|
|
4923
|
+
identity: undefined;
|
|
4924
|
+
generated: undefined;
|
|
4925
|
+
}, {}, {}>;
|
|
4697
4926
|
salaryMin: import("drizzle-orm/pg-core").PgColumn<{
|
|
4698
4927
|
name: "salaryMin";
|
|
4699
4928
|
tableName: "positions";
|
package/dist/schema/core.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
exports.tagRelations = exports.skillRelations = exports.senderRelations = exports.referralToMessageRelations = exports.referralRelations = exports.referralPayoutRelations = exports.positionToSkillRelations = exports.positionToIndustryRelations = exports.positionRelations = exports.personToTagRelations = exports.personToSkillRelations = exports.personToNetworkRelations = exports.personToBestPersonRelations = exports.personRelations = exports.partnerRelations = exports.otpRelations = exports.noteRelations = exports.networkRelations = exports.messageRelations = exports.jwtRelations = exports.jobFunctionRelations = exports.industryRelations = exports.experienceRelations = exports.enrichmentRelations = exports.educationRelations = exports.contractRelations = exports.clientRelations = exports.certificationRelations = exports.candidacyRelations = exports.candidacyFeedbackRelations = exports.campaignRelations = exports.adminRelations = exports.actionRelations = exports.websiteStaticPage = exports.websiteLandingPage = exports.websiteBlock = exports.tag = exports.skill = exports.sender = exports.referralPayout = exports.referralToMessage = exports.referral = exports.positionToTag = void 0;
|
|
3
|
+
exports.position = exports.personToTag = exports.personToSkill = exports.personToNetwork = exports.personToCertification = exports.personToBestPerson = exports.person = exports.partner = exports.otp = exports.note = exports.network = exports.message = exports.listView = exports.jwt = exports.jobFunction = exports.industry = exports.experience = exports.enrichment = exports.education = exports.contract = exports.candidacyFeedback = exports.candidacy = exports.campaign = exports.clientToIndustry = exports.client = exports.certification = exports.admin = exports.action = exports.States = exports.ClientSources = exports.ReferralSources = exports.PositionClosedReasons = exports.PersonSources = exports.MessageStatuses = exports.MessageChannels = exports.ListViewModels = exports.JobLevels = exports.Genders = exports.EnrichmentSources = exports.EmploymentLocationTypes = exports.EmploymentTypes = exports.EducationFields = exports.EducationDegrees = exports.Countries = exports.ClientStatuses = exports.CandidacyStages = exports.CandidacySources = exports.CandidacyRejectors = exports.CandidacyAssessmentCategories = exports.Actions = void 0;
|
|
4
|
+
exports.tagRelations = exports.skillRelations = exports.senderRelations = exports.referralToMessageRelations = exports.referralRelations = exports.referralPayoutRelations = exports.positionToSkillRelations = exports.positionToIndustryRelations = exports.positionRelations = exports.personToTagRelations = exports.personToSkillRelations = exports.personToNetworkRelations = exports.personToBestPersonRelations = exports.personRelations = exports.partnerRelations = exports.otpRelations = exports.noteRelations = exports.networkRelations = exports.messageRelations = exports.jwtRelations = exports.jobFunctionRelations = exports.industryRelations = exports.experienceRelations = exports.enrichmentRelations = exports.educationRelations = exports.contractRelations = exports.clientRelations = exports.certificationRelations = exports.candidacyRelations = exports.candidacyFeedbackRelations = exports.campaignRelations = exports.adminRelations = exports.actionRelations = exports.websiteStaticPage = exports.websiteLandingPage = exports.websiteBlock = exports.tag = exports.skill = exports.sender = exports.referralPayout = exports.referralToMessage = exports.referral = exports.positionToTag = exports.positionToSkill = exports.positionToIndustry = void 0;
|
|
5
5
|
const pg_core_1 = require("drizzle-orm/pg-core");
|
|
6
6
|
const drizzle_orm_1 = require("drizzle-orm");
|
|
7
7
|
const utils_1 = require("../utils");
|
|
@@ -27,6 +27,7 @@ exports.MessageStatuses = (0, pg_core_1.pgEnum)('message_status', (0, utils_1.ma
|
|
|
27
27
|
exports.PersonSources = (0, pg_core_1.pgEnum)('person_source', (0, utils_1.makeEnumFromObj)(constants_1.PERSON_SOURCES));
|
|
28
28
|
exports.PositionClosedReasons = (0, pg_core_1.pgEnum)('position_closed_reason', (0, utils_1.makeEnumFromObj)(constants_1.POSITION_CLOSED_REASONS));
|
|
29
29
|
exports.ReferralSources = (0, pg_core_1.pgEnum)('referral_source', (0, utils_1.makeEnumFromObj)(constants_1.REFERRAL_SOURCES));
|
|
30
|
+
exports.ClientSources = (0, pg_core_1.pgEnum)('client_source', (0, utils_1.makeEnumFromObj)(constants_1.CLIENT_SOURCES));
|
|
30
31
|
exports.States = (0, pg_core_1.pgEnum)('state', (0, utils_1.makeEnumFromObj)(constants_1.STATES));
|
|
31
32
|
// tables
|
|
32
33
|
exports.action = (0, pg_core_1.pgTable)('actions', {
|
|
@@ -146,6 +147,13 @@ exports.client = (0, pg_core_1.pgTable)('clients', {
|
|
|
146
147
|
name: (0, pg_core_1.text)().notNull(),
|
|
147
148
|
description: (0, pg_core_1.text)(),
|
|
148
149
|
isLead: (0, pg_core_1.boolean)().default(false).notNull(),
|
|
150
|
+
website: (0, pg_core_1.text)(),
|
|
151
|
+
referralFee: (0, pg_core_1.integer)(),
|
|
152
|
+
referralFeePercentage: (0, pg_core_1.doublePrecision)().default(0).notNull(),
|
|
153
|
+
retainerFee: (0, pg_core_1.integer)(),
|
|
154
|
+
recruitingSearchFee: (0, pg_core_1.integer)(),
|
|
155
|
+
staffingSearchFee: (0, pg_core_1.integer)(),
|
|
156
|
+
source: (0, exports.ClientSources)(),
|
|
149
157
|
status: (0, exports.ClientStatuses)().default('ACTIVE'),
|
|
150
158
|
deletedAt: (0, pg_core_1.timestamp)({ precision: 3, mode: 'date', withTimezone: true }),
|
|
151
159
|
createdAt: (0, pg_core_1.timestamp)({ precision: 3, mode: 'date', withTimezone: true })
|
|
@@ -155,6 +163,32 @@ exports.client = (0, pg_core_1.pgTable)('clients', {
|
|
|
155
163
|
.defaultNow()
|
|
156
164
|
.notNull()
|
|
157
165
|
});
|
|
166
|
+
exports.clientToIndustry = (0, pg_core_1.pgTable)('clients_to_industries', {
|
|
167
|
+
clientId: (0, pg_core_1.uuid)().notNull(),
|
|
168
|
+
industryId: (0, pg_core_1.uuid)().notNull(),
|
|
169
|
+
createdAt: (0, pg_core_1.timestamp)({ precision: 3, mode: 'date', withTimezone: true })
|
|
170
|
+
.defaultNow()
|
|
171
|
+
.notNull()
|
|
172
|
+
}, (table) => [
|
|
173
|
+
(0, pg_core_1.foreignKey)({
|
|
174
|
+
columns: [table.industryId],
|
|
175
|
+
foreignColumns: [exports.industry.id],
|
|
176
|
+
name: 'ClientToIndustry_industryId_fkey'
|
|
177
|
+
})
|
|
178
|
+
.onUpdate('cascade')
|
|
179
|
+
.onDelete('restrict'),
|
|
180
|
+
(0, pg_core_1.foreignKey)({
|
|
181
|
+
columns: [table.clientId],
|
|
182
|
+
foreignColumns: [exports.client.id],
|
|
183
|
+
name: 'ClientToIndustry_clientId_fkey'
|
|
184
|
+
})
|
|
185
|
+
.onUpdate('cascade')
|
|
186
|
+
.onDelete('restrict'),
|
|
187
|
+
(0, pg_core_1.primaryKey)({
|
|
188
|
+
columns: [table.clientId, table.industryId],
|
|
189
|
+
name: 'ClientToIndustry_pkey'
|
|
190
|
+
})
|
|
191
|
+
]);
|
|
158
192
|
exports.campaign = (0, pg_core_1.pgTable)('campaigns', {
|
|
159
193
|
id: (0, pg_core_1.uuid)().defaultRandom().primaryKey().notNull(),
|
|
160
194
|
name: (0, pg_core_1.text)().notNull(),
|
|
@@ -582,6 +616,8 @@ exports.partner = (0, pg_core_1.pgTable)('partners', {
|
|
|
582
616
|
websiteUrl: (0, pg_core_1.text)(),
|
|
583
617
|
logoUri: (0, pg_core_1.text)(),
|
|
584
618
|
description: (0, pg_core_1.text)(),
|
|
619
|
+
primaryContact: (0, pg_core_1.uuid)(),
|
|
620
|
+
secondaryContact: (0, pg_core_1.uuid)(),
|
|
585
621
|
deletedAt: (0, pg_core_1.timestamp)({ precision: 3, mode: 'date', withTimezone: true }),
|
|
586
622
|
createdAt: (0, pg_core_1.timestamp)({ precision: 3, mode: 'date', withTimezone: true })
|
|
587
623
|
.defaultNow()
|
|
@@ -589,7 +625,22 @@ exports.partner = (0, pg_core_1.pgTable)('partners', {
|
|
|
589
625
|
updatedAt: (0, pg_core_1.timestamp)({ precision: 3, mode: 'date', withTimezone: true })
|
|
590
626
|
.defaultNow()
|
|
591
627
|
.notNull()
|
|
592
|
-
})
|
|
628
|
+
}, (table) => [
|
|
629
|
+
(0, pg_core_1.foreignKey)({
|
|
630
|
+
columns: [table.primaryContact],
|
|
631
|
+
foreignColumns: [exports.person.id],
|
|
632
|
+
name: 'Partner_primaryContact_fkey'
|
|
633
|
+
})
|
|
634
|
+
.onUpdate('cascade')
|
|
635
|
+
.onDelete('set null'),
|
|
636
|
+
(0, pg_core_1.foreignKey)({
|
|
637
|
+
columns: [table.secondaryContact],
|
|
638
|
+
foreignColumns: [exports.person.id],
|
|
639
|
+
name: 'Partner_secondaryContact_fkey'
|
|
640
|
+
})
|
|
641
|
+
.onUpdate('cascade')
|
|
642
|
+
.onDelete('set null')
|
|
643
|
+
]);
|
|
593
644
|
exports.person = (0, pg_core_1.pgTable)('persons', {
|
|
594
645
|
id: (0, pg_core_1.uuid)().defaultRandom().primaryKey().notNull(),
|
|
595
646
|
email: (0, pg_core_1.text)().notNull(),
|
|
@@ -812,6 +863,7 @@ exports.position = (0, pg_core_1.pgTable)('positions', {
|
|
|
812
863
|
lon: (0, pg_core_1.doublePrecision)(),
|
|
813
864
|
isHidden: (0, pg_core_1.boolean)().default(false).notNull(),
|
|
814
865
|
isHiddenClient: (0, pg_core_1.boolean)().default(false).notNull(),
|
|
866
|
+
isPriority: (0, pg_core_1.boolean)().default(false).notNull(),
|
|
815
867
|
salaryMin: (0, pg_core_1.integer)(),
|
|
816
868
|
salaryMax: (0, pg_core_1.integer)(),
|
|
817
869
|
ratings: (0, pg_core_1.jsonb)().$type(),
|