Compare commits
769 Commits
Author | SHA1 | Date |
---|---|---|
|
c5b4147132 | |
|
0dad8507a8 | |
|
5c972e4e1d | |
|
7f39500d5d | |
|
e4392ca04b | |
|
5cba1c5550 | |
|
ea9d14a658 | |
|
983537ac2c | |
|
fa94b9dba0 | |
|
8b63483aa2 | |
|
f11ef41686 | |
|
9e4909cbf7 | |
|
3d61290d73 | |
|
f02a5fac49 | |
|
2eaec04617 | |
|
5dd02b1d47 | |
|
94e3807c72 | |
|
b2e820345c | |
|
b60673b2c8 | |
|
d6a50736b0 | |
|
93b960924f | |
|
248a953da1 | |
|
54b8796861 | |
|
02826f04ef | |
|
3365eda777 | |
|
5c7069049d | |
|
a45315e52b | |
|
3de4780872 | |
|
a6359e337b | |
|
a9cd10afe4 | |
|
d2fdffbace | |
|
167bd5e308 | |
|
b5e9b29b46 | |
|
0801d64457 | |
|
3bafd16c86 | |
|
7a0ed2a997 | |
|
c0703662ca | |
|
90e56e4ea2 | |
|
f1bf1b61ec | |
|
efee8c7fda | |
|
497b8f6bc0 | |
|
d8b200091e | |
|
9838cea77d | |
|
5e5ab8f3b4 | |
|
18b12a8abf | |
|
11995a2c6c | |
|
2b86660310 | |
|
1afcc4b8c7 | |
|
3ef7409aaf | |
|
fdbec1fbc2 | |
|
ed6605b476 | |
|
0af108d24d | |
|
02a2444892 | |
|
d661ef5c30 | |
|
5f2111af16 | |
|
9dbec74a21 | |
|
2666344b36 | |
|
c3a287dc17 | |
|
e3a414e3ab | |
|
55ba8dcf68 | |
|
2715cb88e9 | |
|
afc6e6270c | |
|
b4bb08d8ee | |
|
5194d78486 | |
|
cfd56cfba1 | |
|
a56d9c5c78 | |
|
36f484632a | |
|
02be66d524 | |
|
fb7217cd6b | |
|
c9ae0a2d40 | |
|
745d81e0f8 | |
|
113e861912 | |
|
754f8f711b | |
|
be85d744ef | |
|
3ec62e0fb1 | |
|
671f54959b | |
|
f55ce5f894 | |
|
8113199732 | |
|
bbbbb9cad4 | |
|
85338925dc | |
|
84971aa922 | |
|
63bf35e474 | |
|
7716875cdf | |
|
a2bbe6ef1a | |
|
ce8f3c6346 | |
|
cdfbabbe14 | |
|
3e91ff2d6a | |
|
0e02e23015 | |
|
8e53e8dd4d | |
|
75d7132409 | |
|
55beb386e8 | |
|
ada6a68420 | |
|
c6941c0a5a | |
|
9e7f5150d6 | |
|
841cf3c36b | |
|
7f140afb6a | |
|
429067dfd5 | |
|
91abe74fd6 | |
|
3ee29b1249 | |
|
316c696b63 | |
|
b99c547c41 | |
|
b7d1cef759 | |
|
53fb711f9a | |
|
00cdc2ff8c | |
|
1db5e46fcf | |
|
ff54652f54 | |
|
c2599d6a8c | |
|
a6fd4c4c09 | |
|
2360c07aec | |
|
9c84b87d5a | |
|
bd21b93df2 | |
|
3b965cc173 | |
|
3e21aabef3 | |
|
b7f5bc004c | |
|
65beeb87b4 | |
|
7535ce1df7 | |
|
59994f0e45 | |
|
7b4b120c2f | |
|
2618784dd0 | |
|
8299a5463e | |
|
8a73925601 | |
|
3995d2d2cc | |
|
93d5c4cace | |
|
55c23f6c0c | |
|
fd97f25de1 | |
|
247a60efab | |
|
65c4254dad | |
|
1135fe45b2 | |
|
a81364e1d9 | |
|
6db6c5f3c3 | |
|
a395dcee34 | |
|
237b08442e | |
|
710e67063b | |
|
ad6d2f27e2 | |
|
7dcca6a4f4 | |
|
433a2ca11a | |
|
c99f57260d | |
|
24e68ea74a | |
|
9ee151342e | |
|
fd2bd5862c | |
|
5acda1cde9 | |
|
d284b2b609 | |
|
a47b63e7a1 | |
|
c1bdc53730 | |
|
a225b9ba93 | |
|
b0c7006a2d | |
|
7f3a8ccf13 | |
|
2d4f1fad34 | |
|
e57c08ae16 | |
|
0ded6844ac | |
|
4a59732281 | |
|
e32c7efab2 | |
|
ebc98e85bc | |
|
861303016f | |
|
f400af76af | |
|
d54586fbfe | |
|
964f791e46 | |
|
2293b6b8c4 | |
|
7b044e11c3 | |
|
4a1e95a777 | |
|
9d0721c4f9 | |
|
0cdd5ac9a1 | |
|
c1d926c6fa | |
|
5b2f06fadc | |
|
57489d62e4 | |
|
d1956ca12a | |
|
a79e132161 | |
|
5ecaf75270 | |
|
5d34a44237 | |
|
31a166e6e0 | |
|
123a4cc840 | |
|
3d09cf4e12 | |
|
cc22f23d97 | |
|
3fe4f760ac | |
|
6926aa41cd | |
|
bd9a30f1f8 | |
|
59c836c45d | |
|
1dda831c54 | |
|
373480b9e1 | |
|
5afb0506d2 | |
|
058765bf47 | |
|
a421a0d98a | |
|
cc035387d7 | |
|
a7c9f58ef3 | |
|
ffbb6a29f2 | |
|
0841e5ff76 | |
|
e32341eed2 | |
|
96b1a4c23f | |
|
6792e20f0f | |
|
c10aa15347 | |
|
e840b3bf08 | |
|
d6b03a5b46 | |
|
5625ef3f04 | |
|
e1e585df23 | |
|
f752264101 | |
|
c2288ba69c | |
|
ec97ee992a | |
|
d1fc6e559c | |
|
98465a6128 | |
|
be52ecc51b | |
|
c0e9b6c138 | |
|
79500b8a35 | |
|
ac215dcbff | |
|
30c68afed6 | |
|
63b6a61ad3 | |
|
d311d8dd96 | |
|
075f7bfba8 | |
|
8f4246da6d | |
|
9c18cb28e8 | |
|
1ebd32ca2f | |
|
9815d125ff | |
|
8e15d49ad0 | |
|
2979950c19 | |
|
ec1487b33b | |
|
762b55db4f | |
|
6d3c29e6c4 | |
|
29abea1cd9 | |
|
849fa867b2 | |
|
1ae3502b9b | |
|
32bbb45f4e | |
|
35a06c1185 | |
|
2ae41695dc | |
|
cd4ed504df | |
|
fec915cffa | |
|
f4e5d2ddb1 | |
|
39c96f86da | |
|
ed4b438d33 | |
|
5e943047e2 | |
|
45a906bccf | |
|
9cb8ab3e15 | |
|
8864a47400 | |
|
32302e33a5 | |
|
b161df0b70 | |
|
80fd274662 | |
|
a7b4daec21 | |
|
5ea3aac37d | |
|
bd73a0b7b1 | |
|
70006d4115 | |
|
acc9ab00e1 | |
|
5a4e4e8977 | |
|
36541b5244 | |
|
4b327b5132 | |
|
d708b42970 | |
|
3605c9fa63 | |
|
230b32be34 | |
|
b3eb2f6d6b | |
|
7e06e07df4 | |
|
f7d1c8d2c4 | |
|
c86c77d1e0 | |
|
ca17ef9162 | |
|
7419cb4608 | |
|
c76607acfe | |
|
07b814464e | |
|
5e8da6c3f8 | |
|
0c9dfd7658 | |
|
b47cfceb09 | |
|
6881fe8bd5 | |
|
c0615baf5c | |
|
47bc5fb154 | |
|
ea57743cfe | |
|
8e08ff86f4 | |
|
48dccb821e | |
|
55e93102de | |
|
ab7f064734 | |
|
c3e8490656 | |
|
03b0e4d856 | |
|
6682d81d2e | |
|
21c9d9410a | |
|
64bc8158c1 | |
|
1acb37939c | |
|
fcff0d663f | |
|
397ea3f4aa | |
|
e7431867c2 | |
|
960ffdc8dc | |
|
e8aa1c9fda | |
|
2c94691b07 | |
|
410053425c | |
|
3cc238b0ce | |
|
6c53956551 | |
|
d4283eb522 | |
|
84768a1cb6 | |
|
fac7d6c48d | |
|
a208435dad | |
|
3e0a40efeb | |
|
8f0f4e928d | |
|
1a34bb2825 | |
|
8798958f3d | |
|
0f1e46bd7e | |
|
2ae9f2c618 | |
|
fe94c9d2da | |
|
538fa5ccf7 | |
|
ade6d1d88d | |
|
6bfa1ff61e | |
|
27095e3747 | |
|
91696571fe | |
|
68f3c72945 | |
|
85fd874769 | |
|
8fdea6b5bc | |
|
568b674322 | |
|
84e0e42b4a | |
|
1ea1afc8a2 | |
|
e62c2ae50f | |
|
521ade6cf0 | |
|
a2bf45ad56 | |
|
bd3d1594b7 | |
|
1e0890b02c | |
|
e152de2284 | |
|
3ecc756052 | |
|
a8fdca65cd | |
|
42e990f180 | |
|
389862feb3 | |
|
de94958ce1 | |
|
a459f71325 | |
|
939cbccc3f | |
|
ed4cea1b11 | |
|
9492cacecf | |
|
27fb277a98 | |
|
84710209f3 | |
|
39b5a51aa2 | |
|
69e5610323 | |
|
44b3b66fbd | |
|
4ee80b9029 | |
|
0614a7ecf4 | |
|
6746f54792 | |
|
2a4045cbcc | |
|
576f0292a1 | |
|
f7ff20bb22 | |
|
a103879b5c | |
|
763e8f0332 | |
|
6bed79f1fd | |
|
4d280f0846 | |
|
2e37e90cc8 | |
|
9133ffc78d | |
|
8dfe6b0bdd | |
|
b1f16a06e9 | |
|
45d147567d | |
|
0f40848a70 | |
|
9ef1bdca43 | |
|
b027f1cac4 | |
|
2f5e498282 | |
|
960bbcbb0a | |
|
6eb54203bb | |
|
10a049f627 | |
|
22f2f15aa4 | |
|
d7548460e6 | |
|
774acae664 | |
|
766bee0e0c | |
|
720759628d | |
|
d8d4b0f092 | |
![]() |
41e6c346d7 | |
|
288a585c1a | |
|
04ae318d69 | |
|
04e83f6732 | |
|
0132b298b9 | |
|
632e79e9c6 | |
|
59d4b25771 | |
|
ea8db4f503 | |
|
9df6b52392 | |
|
a1fc43242e | |
|
2acf394da3 | |
|
7e5300d9fc | |
|
d12f47cff5 | |
|
78609f249f | |
|
45b15ac1b3 | |
|
f7df1f7568 | |
|
58255b3c2e | |
|
e6538a62a5 | |
|
410d8712c3 | |
|
e3620faafe | |
|
a12686e37f | |
|
01b207e52f | |
|
635039f118 | |
|
c3f5315947 | |
|
4bbf2b42b9 | |
|
4b835db8a2 | |
|
87354c6dea | |
|
87aa16929b | |
|
839eb31d65 | |
|
b3d110f90f | |
|
248c1e3584 | |
|
e277cda780 | |
|
2e13df0955 | |
|
0db31eb0c1 | |
|
f48a34e88a | |
|
84c3caeb1c | |
|
a7e07008b8 | |
|
0ba2815fbd | |
|
352f8a03ad | |
|
fa5cf0c115 | |
|
05119f52fa | |
|
199fc1a8b9 | |
|
db19a84080 | |
|
000f22a50c | |
|
79b62234ea | |
|
3b4cba3771 | |
|
de28a30028 | |
|
ef61793616 | |
|
f70caba3f2 | |
|
7589e9b078 | |
|
ce906c0470 | |
|
f8423afe2a | |
|
4de0a1f681 | |
|
98e422953c | |
|
c118ed59d4 | |
|
0d53dab7a8 | |
|
64670923e1 | |
|
b52f15a937 | |
|
471a28be8a | |
|
bf35f97961 | |
|
64cd69d024 | |
|
e5c2082bf2 | |
|
c188405de0 | |
|
3c80296253 | |
|
e77bb03639 | |
|
ef5892a0d6 | |
|
65a8618e54 | |
|
3f6ae58374 | |
|
70b102f87e | |
|
8e50cc7313 | |
|
e64d645d36 | |
|
5844c52efe | |
|
4e0e9d0f9e | |
|
f25a4d4532 | |
|
a4e63b8a41 | |
|
82f2857667 | |
|
d9af66152c | |
|
94f232f67c | |
|
5f546f951f | |
|
34538919b1 | |
|
26055d2ed0 | |
|
b7f4cf93a0 | |
|
c3d2b4d325 | |
|
c0f92584ef | |
|
7c63e22b3a | |
|
db32fe0f67 | |
|
7bd6b0eeac | |
|
77d0714e33 | |
|
6bf1a60bbd | |
|
ce185607db | |
|
862bb53cdb | |
|
11aa89353f | |
|
508eea359e | |
|
a5bdb72890 | |
|
b0329a04f0 | |
|
e55d08279b | |
|
6948c2e4ee | |
|
78a7e88410 | |
|
b37ce69c25 | |
|
5e6482aa2e | |
|
be594c7513 | |
|
bb97c4dea6 | |
|
b2237f97f2 | |
|
13f40ab6ae | |
|
2c7f349043 | |
|
f8d22632ec | |
|
b345ae0c8f | |
|
2414deb624 | |
|
7d0dba9669 | |
|
dac178e712 | |
|
2729e20351 | |
|
8b8fffdab1 | |
|
d200793d20 | |
|
587e80b1bf | |
|
f123ffa7e2 | |
|
817f1d5705 | |
|
35494dc7ea | |
|
d10377e0f9 | |
|
6a665bc976 | |
|
18d2a10708 | |
|
22d5f54a47 | |
|
fc93596c39 | |
|
910cc15148 | |
|
11df1e1f1c | |
|
0adec461d0 | |
|
7c467d2e0e | |
|
4526867601 | |
|
10d23fe464 | |
|
89f55bc132 | |
|
707161380f | |
|
0311ee3e6a | |
|
111b078147 | |
|
283333e1ee | |
|
41d5170225 | |
|
a5c300c9b2 | |
|
9741bf83b9 | |
|
94e2b1c01e | |
|
992d457b8a | |
|
4fa350964f | |
|
c8b1e43337 | |
|
cf1852a302 | |
|
a879639b53 | |
|
a53c10483e | |
|
d8213639d3 | |
|
2f12a900e6 | |
|
410bf290c9 | |
|
1ed11d9787 | |
|
bde445859a | |
|
22805022a9 | |
|
925ba937b4 | |
|
3209f8ef7e | |
|
bc424bee33 | |
|
612bef14ad | |
|
5913a52f2b | |
|
25039b52de | |
|
c9f7b59d52 | |
|
7d1ffb9887 | |
|
71838f4ac7 | |
|
b885e3445f | |
|
9f24e0bcca | |
|
4d22edabd0 | |
|
966cf2e8d6 | |
|
d38f997701 | |
|
44f4454d96 | |
|
0666c99151 | |
|
495cc8360c | |
|
510e3d3227 | |
|
fa13f19b4c | |
|
d33fea03bc | |
|
50ea8ddc1f | |
|
8a4a627f80 | |
|
e99e580d5e | |
|
56632892ce | |
|
0edcfb7af3 | |
|
c12c318a0b | |
|
490d11e249 | |
|
0f2f0dc64d | |
|
dccc68b710 | |
|
b7e0d8ff90 | |
|
7b51ee7e88 | |
|
ff9cffa715 | |
|
f458b39f37 | |
|
1305a09b02 | |
|
6c41118785 | |
|
5034a4dace | |
|
1dd083e236 | |
|
1ec0a4f20f | |
|
9c9f625c53 | |
|
fc27afc529 | |
|
49bf414ce9 | |
|
fa3e456271 | |
|
68d0956cba | |
|
dbdcd4dda9 | |
|
511087cf90 | |
|
3ce6417fd0 | |
|
39702cad4b | |
|
a6700a2bca | |
|
fd67a20a2b | |
|
ffd7539179 | |
|
a47c0761d2 | |
|
29af9f692f | |
|
d1fa6c6170 | |
|
08fb401c57 | |
|
e8ef133a88 | |
|
9595aabccf | |
|
f179c4ef1f | |
|
596a555d78 | |
|
9787ff8f34 | |
|
335413fdcd | |
|
0eb4f3fc5b | |
|
7d15aa43cf | |
|
b87afb1383 | |
|
c7a0c095de | |
|
3fe24cff3a | |
|
ee9e2ba257 | |
|
4e2d599d4e | |
|
00896853e1 | |
|
daee770519 | |
|
d59da5d186 | |
|
9285847bb7 | |
|
325a2d1f7c | |
|
73e1f76570 | |
|
b52db41965 | |
|
a905f31b2c | |
|
6a6c939953 | |
|
4330fb5448 | |
|
34c8c7d605 | |
|
0822bee33b | |
|
f88e8e8409 | |
|
d5edb6da60 | |
|
77ad895098 | |
|
dfdd27cb85 | |
|
b5c930ed68 | |
|
6ff3842d5e | |
|
3c90c2f7e9 | |
|
50d3386592 | |
|
7052e8c175 | |
|
e6f2be64b4 | |
|
43af4b7ad6 | |
|
356eeb6954 | |
|
f8031caa2f | |
|
cc462ab6ab | |
|
d3c0c21f1b | |
|
85d49ad4cd | |
|
2b68ea7c6a | |
|
057f915b29 | |
|
5d0c95e085 | |
|
f6bbbe6b02 | |
|
e78160d654 | |
|
fecb470c99 | |
|
0335616d57 | |
|
f28332ab88 | |
|
97c4217582 | |
|
cf5af1a5c7 | |
|
c252f57bd5 | |
|
53433787eb | |
|
c196dcea32 | |
|
ebacebb26b | |
|
e7d08d46c8 | |
|
e9d12dfce7 | |
|
7f3275b705 | |
|
c3c3dfceb5 | |
|
90f8556f8c | |
|
a26bd49a96 | |
|
a1cd0f4e9b | |
|
632439dad4 | |
|
8dc967c6ec | |
|
b1d7a4e4e6 | |
|
dd08da88a0 | |
|
3ccea65d2a | |
|
8481ab1044 | |
|
35d614e582 | |
|
e1ca8e8f78 | |
|
384981716d | |
|
fbf1517901 | |
|
0da41c265d | |
|
21e5e0672a | |
|
a818e7d820 | |
|
bead5bff14 | |
|
101f6c7d70 | |
|
a828903299 | |
|
53be75b7d5 | |
|
2f50694016 | |
|
827550a5fd | |
|
6c91ec2077 | |
|
2f13d5f009 | |
|
d9880dbff1 | |
|
b37aae2154 | |
|
2e947f5fb0 | |
|
5507c6a9d2 | |
|
5a1c01d8cb | |
|
1146c5db40 | |
|
702811bafa | |
|
b2b8f3b553 | |
|
0933cce7b5 | |
|
641a565e5c | |
|
e0a3f4c15c | |
|
e86a7665a0 | |
|
9de6dafef1 | |
|
0f8ff5d349 | |
|
1441fc90af | |
|
2906dbdc75 | |
|
0062199bd6 | |
|
9f61ecf9c2 | |
|
7c40353f6b | |
|
4d92a70321 | |
|
64c5275062 | |
|
1df0ce35a6 | |
|
1f640fda5e | |
|
3a4183cd48 | |
|
c98bae6e25 | |
|
522feeffad | |
|
4fcf80ae2a | |
|
0a3fb2503d | |
|
6e5ffb3c77 | |
|
2cf660c6de | |
|
d68018b755 | |
|
e93cc73d51 | |
|
db672a2beb | |
|
842837fb4e | |
|
de33d38e1b | |
|
5734758f96 | |
|
02f1ce8b96 | |
|
e7fe80dc31 | |
|
6d212b4561 | |
|
06bdab6440 | |
|
7d9eed3b55 | |
|
7f621eb8a2 | |
|
0475efce3c | |
|
a5acf92139 | |
|
f099cf9502 | |
|
089625715d | |
|
42fd9ac886 | |
|
ef83bcc0b2 | |
|
fa1dc71a36 | |
|
dee60943d0 | |
|
523d91f920 | |
|
27a82e8c0f | |
|
598a0dc39a | |
|
4beb2ac50f | |
|
03303a21eb | |
|
0bf2a01e8c | |
|
9757e36b0e | |
|
f062cb55c7 | |
|
3c1ce16a22 | |
|
4adb491d4b | |
|
c1fa71ad7c | |
|
85a8ec7903 | |
|
8c85cec83d | |
|
51b44fb0d2 | |
|
1e832774c7 | |
|
f2176461d5 | |
|
0a7d781fed | |
|
bfd3a95a4b | |
|
ebaf817290 | |
|
0209ea7ce1 | |
|
68ab7330a0 | |
|
bbefdc4bf0 | |
|
41de7b8a19 | |
|
2a2a803d20 | |
|
09fe9d55a5 | |
|
76eac28a0e | |
|
5d9d95271e | |
|
02aa147d04 | |
|
eeab673461 | |
|
1cdf44a314 | |
|
6420341030 | |
|
5d4af9dc41 | |
|
f2b2d6b1ae | |
|
a6bcb0ee3e | |
|
b5befc08aa | |
|
16d3579dae | |
|
b649fe019c | |
|
809c3ead19 | |
|
c90dc49d08 | |
|
f1b4cdcd6d | |
|
30efd69822 | |
|
23a7c81b6d | |
|
c696505835 | |
|
a51384222b | |
|
df976b7a7d | |
|
016f1250b9 | |
|
87a923079d | |
|
d90f358311 | |
|
d9785ceeb3 | |
|
76ebfaf9a7 | |
|
75c75293b1 | |
|
5e137e236d | |
|
8f9883530b | |
|
2936f03658 | |
|
6131f64e71 | |
|
44d19cfd0e | |
|
4b3f845569 | |
|
97c41f00c9 | |
|
b412176868 | |
|
5fec9d6241 | |
|
e7ffec6a70 | |
|
d8ef797cce | |
|
e51327bbda | |
|
0f1b9f952a | |
|
2394d5d8f0 | |
|
32111902f0 | |
|
d9ac37ff18 | |
|
546d0d5ab8 | |
|
e67915db50 | |
|
ef73e35d73 | |
|
1f7566bf90 | |
|
d74a910803 | |
|
b1995c9482 | |
|
550d8c7b45 | |
|
95b2348e85 | |
|
bd10d88632 | |
|
3b177fae95 | |
|
f95b055bdd | |
|
2ab481bab0 | |
|
99490862b3 | |
|
54b317849f | |
|
fdc10090a7 | |
|
a6918b297b | |
|
7eccc0db17 |
|
@ -0,0 +1,44 @@
|
|||
# Copied from https://github.com/facebook/docusaurus/blob/main/.github/workflows/lint.yml
|
||||
name: Lint
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
|
||||
cancel-in-progress: true
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
env:
|
||||
DATABASE_URL: 'postgresql://postgres:password@localhost:5432/postgres'
|
||||
GITHUB_CLIENT_ID: '1234'
|
||||
GITHUB_CLIENT_SECRET: 'abcd'
|
||||
NEXTAUTH_SECRET: 'efgh'
|
||||
NEXTAUTH_URL: 'http://localhost:3000'
|
||||
NODE_ENV: test
|
||||
SUPABASE_ANON_KEY: 'ijkl'
|
||||
SUPABASE_URL: 'https://abcd.supabase.co'
|
||||
|
||||
jobs:
|
||||
lint:
|
||||
name: Lint
|
||||
timeout-minutes: 30
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
- name: Set up Node
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: '16'
|
||||
cache: yarn
|
||||
- name: Installation
|
||||
run: yarn
|
||||
- name: Check immutable yarn.lock
|
||||
run: git diff --exit-code
|
||||
- name: Lint
|
||||
run: yarn lint
|
|
@ -0,0 +1,37 @@
|
|||
# Copied from https://github.com/facebook/docusaurus/blob/main/.github/workflows/lint.yml
|
||||
name: Typecheck
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
|
||||
cancel-in-progress: true
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
tsc:
|
||||
name: Typecheck
|
||||
timeout-minutes: 30
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
- name: Set up Node
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: '16'
|
||||
cache: yarn
|
||||
- name: Installation
|
||||
run: yarn
|
||||
- name: Check immutable yarn.lock
|
||||
run: git diff --exit-code
|
||||
# Build the shared types in dependent packages.
|
||||
- name: Build dependencies
|
||||
run: yarn turbo run build --filter=ui
|
||||
- name: Typecheck
|
||||
run: yarn tsc
|
|
@ -0,0 +1,23 @@
|
|||
.idea
|
||||
.DS_Store
|
||||
node_modules
|
||||
.turbo
|
||||
*.log
|
||||
.next
|
||||
dist
|
||||
dist-ssr
|
||||
*.local
|
||||
.env
|
||||
.cache
|
||||
server/dist
|
||||
public/dist
|
||||
.turbo
|
||||
|
||||
.yarn/*
|
||||
!.yarn/patches
|
||||
!.yarn/plugins
|
||||
!.yarn/releases
|
||||
!.yarn/sdks
|
||||
!.yarn/versions
|
||||
|
||||
tsconfig.tsbuildinfo
|
|
@ -1,8 +0,0 @@
|
|||
tasks:
|
||||
- command: gp await-port 3000 && gp preview $(gp url 3000)/tech-interview-handbook/
|
||||
- before: cd website/
|
||||
init: yarn install
|
||||
command: yarn start
|
||||
ports:
|
||||
- port: 3000
|
||||
onOpen: ignore
|
|
@ -0,0 +1,27 @@
|
|||
node_modules
|
||||
.next
|
||||
build
|
||||
dist
|
||||
*.tsbuildinfo
|
||||
*.gitignore
|
||||
*.svg
|
||||
*.lock
|
||||
*.npmignore
|
||||
*.sql
|
||||
*.png
|
||||
*.jpg
|
||||
*.jpeg
|
||||
*.gif
|
||||
*.ico
|
||||
*.sh
|
||||
Dockerfile
|
||||
Dockerfile.*
|
||||
.env
|
||||
.env.*
|
||||
LICENSE
|
||||
*.log
|
||||
.DS_Store
|
||||
.dockerignore
|
||||
*.patch
|
||||
*.toml
|
||||
*.prisma
|
|
@ -1,6 +1,5 @@
|
|||
{
|
||||
"bracketSpacing": false,
|
||||
"jsxBracketSameLine": true,
|
||||
"bracketSameLine": true,
|
||||
"printWidth": 80,
|
||||
"proseWrap": "never",
|
||||
"singleQuote": true,
|
||||
|
|
|
@ -0,0 +1,22 @@
|
|||
{
|
||||
"files.trimFinalNewlines": true,
|
||||
"files.trimTrailingWhitespace": true,
|
||||
"cSpell.autoFormatConfigFile": true,
|
||||
"editor.formatOnPaste": true,
|
||||
"editor.formatOnSave": true,
|
||||
"editor.formatOnSaveMode": "file",
|
||||
"javascript.format.enable": true,
|
||||
"json.format.enable": true,
|
||||
"eslint.format.enable": false,
|
||||
"css.format.enable": true,
|
||||
"css.format.newlineBetweenRules": true,
|
||||
"css.format.newlineBetweenSelectors": true,
|
||||
"css.format.preserveNewLines": true,
|
||||
"typescript.format.enable": true,
|
||||
"editor.codeActionsOnSave": {
|
||||
"source.fixAll": true
|
||||
},
|
||||
"[prisma]": {
|
||||
"editor.defaultFormatter": "Prisma.prisma"
|
||||
}
|
||||
}
|
37
README.md
|
@ -2,33 +2,36 @@
|
|||
|
||||
<div align="center">
|
||||
<a href="https://www.techinterviewhandbook.org/">
|
||||
<img src="website/static/img/logo.svg" alt="Tech Interview Handbook" width="400">
|
||||
<img src="assets/logo.svg" alt="Tech Interview Handbook" width="400" />
|
||||
</a>
|
||||
<br />
|
||||
<h3>
|
||||
<a href="https://www.techinterviewhandbook.org/">Read on the website</a>
|
||||
</h3>
|
||||
<p>
|
||||
Follow us on <a href="https://facebook.com/techinterviewhandbook">Facebook</a> | <a href="https://twitter.com/techinterviewhb">Twitter</a> | <a href="https://t.me/techinterviewhandbook">Telegram</a>
|
||||
Join/follow us on <a href="https://discord.com/invite/usMqNaPczq" target="_blank">Discord</a> | <a href="https://twitter.com/techinterviewhb" target="_blank">𝕏 (Twitter)</a> | <a href="https://t.me/techinterviewhandbook" target="_blank">Telegram</a> | <a href="https://facebook.com/techinterviewhandbook" target="_blank">Facebook</a>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
---
|
||||
|
||||
<a href="https://www.techinterviewhandbook.org/software-engineering-interview-guide/" target="_blank">
|
||||
<img src="assets/start-reading-button.jpg" alt="Start Reading Tech Interview Handbook" />
|
||||
</a>
|
||||
|
||||
## What is this?
|
||||
|
||||
Not everyone has the time to do a few hundred LeetCode questions. Here are _free and curated_ technical interview preparation materials for busy engineers, brought to you by me, the author of the [Blind 75 list](https://www.teamblind.com/post/New-Year-Gift---Curated-List-of-Top-75-LeetCode-Questions-to-Save-Your-Time-OaM1orEU). Over 500,000 people have benefitted from this handbook!
|
||||
Not everyone has the time to do a few hundred LeetCode questions. Here are _free and curated_ technical interview preparation materials for busy engineers, brought to you by me, the author of [Blind 75](https://www.teamblind.com/post/New-Year-Gift---Curated-List-of-Top-75-LeetCode-Questions-to-Save-Your-Time-OaM1orEU). Over 1,000,000 people have benefitted from this handbook!
|
||||
|
||||
Besides the usual algorithm questions, other **awesome** stuff includes:
|
||||
|
||||
- [Best practice questions](https://techinterviewhandbook.org/best-practice-questions/) for coding interviews
|
||||
- [How to prepare](https://www.techinterviewhandbook.org/coding-interview/) for coding interviews
|
||||
- [Coding interview cheatsheet](https://www.techinterviewhandbook.org/cheatsheet/) - Straight-to-the-point Do's and Don'ts
|
||||
- [Algorithm tips](https://www.techinterviewhandbook.org/algorithms/introduction/) categorized by topic
|
||||
- [Interview formats](https://www.techinterviewhandbook.org/interview-formats/) of the top tech companies
|
||||
- [Step-by-step resume guide](https://www.techinterviewhandbook.org/resume/guide/) to prepare a FAANG-ready resume
|
||||
- [Behavioral questions](https://www.techinterviewhandbook.org/behavioral-questions/) asked by the top tech companies
|
||||
- [Good questions to ask your interviewers](https://www.techinterviewhandbook.org/questions-to-ask/) at the end of the interviews
|
||||
- [Best practice questions](https://www.techinterviewhandbook.org/coding-interview-study-plan/) for coding interviews
|
||||
- [Grind 75](https://www.techinterviewhandbook.org/grind75/) - the next evolution of Blind 75, bigger and better
|
||||
- [How to prepare](https://www.techinterviewhandbook.org/coding-interview-prep/) for coding interviews
|
||||
- [Coding interview best practices](https://www.techinterviewhandbook.org/coding-interview-cheatsheet/) - Straight-to-the-point Do's and Don'ts
|
||||
- [Algorithm cheatsheets and tips](https://www.techinterviewhandbook.org/algorithms/study-cheatsheet/) categorized by topic
|
||||
- [Step-by-step Software Engineer resume guide](https://www.techinterviewhandbook.org/resume/) to prepare a FAANG-ready resume
|
||||
- [Behavioral questions](https://www.techinterviewhandbook.org/behavioral-interview-questions/) asked by the top tech companies
|
||||
- [Front end interview preparation](https://www.frontendinterviewhandbook.com)
|
||||
|
||||
Help from you in contributing content would be very much appreciated!
|
||||
|
@ -46,14 +49,16 @@ Anybody who wants to land a job at a tech company but is new to technical interv
|
|||
---
|
||||
|
||||
<div align="center">
|
||||
<h3>💡 Looking for high-quality interview courses? <a href="https://www.educative.io/explore?search_string=interview&aff=x23W">Educative</a> offers a ton of great courses to improve your interview game 💡</h3>
|
||||
<h3>💡 Stop grinding mindlessly! Study coding question patterns efficiently with
|
||||
<a href="https://www.designgurus.io/course/grokking-the-coding-interview?aff=kJSIoU">Grokking the Coding Interview</a> by Design Gurus 💡
|
||||
</h3>
|
||||
</div>
|
||||
|
||||
---
|
||||
|
||||
## How is this repository different?
|
||||
|
||||
There are many awesome books like [Cracking the Coding Interview](http://www.crackingthecodinginterview.com/) and interview-related repositories out there on GitHub, what makes this repository different? The difference is that many existing interview repositories contain mainly links to external resources whereas this repository contains top-quality curated content directly for your consumption.
|
||||
There are many awesome books like "Cracking the Coding Interview" and interview-related repositories out there on GitHub, what makes this repository different? The difference is that many existing interview repositories contain mainly links to external resources whereas this repository contains top-quality curated content directly for your consumption.
|
||||
|
||||
Also, existing resources focus mainly on algorithm questions and lack coverage for more domain-specific and non-technical questions. This handbook aims to cover content beyond the typical algorithmic coding questions. 😎
|
||||
|
||||
|
@ -63,9 +68,9 @@ Also, existing resources focus mainly on algorithm questions and lack coverage f
|
|||
|
||||
AlgoMonster aims to help you ace the technical interview **in the shortest time possible**. By Google engineers, AlgoMonster uses a data-driven approach to teach you the most useful key question patterns and has contents to help you quickly revise basic data structures and algorithms. Best of all, AlgoMonster is not subscription-based - pay a one-time fee and get **lifetime access**. [**Join today for a 70% discount →**](https://shareasale.com/r.cfm?b=1873647&u=3114753&m=114505&urllink=&afftrack=)
|
||||
|
||||
### [Grokking the Coding Interview: Patterns for Coding Questions](https://www.educative.io/courses/grokking-the-coding-interview?aff=x23W)
|
||||
### [Grokking the Coding Interview: Patterns for Coding Questions](https://www.designgurus.io/course/grokking-the-coding-interview?aff=kJSIoU)
|
||||
|
||||
This course by Educative expands upon the questions on the recommended practice questions but approaches the practicing from a questions pattern perspective, which is an approach I also agree with for learning and have personally used to get better at coding interviews. The course allows you to practice selected questions in Java, Python, C++, JavaScript and also provides sample solutions in those languages. **Learn and understand patterns, not memorize answers!** [**Join today for a 10% discount →**](https://www.educative.io/courses/grokking-the-coding-interview?aff=x23W)
|
||||
This course by Design Gurus expands upon the questions on the recommended practice questions but approaches the practicing from a questions pattern perspective, which is an approach I also agree with for learning and have personally used to get better at coding interviews. The course allows you to practice selected questions in Java, Python, C++, JavaScript and also provides sample solutions in those languages. **Learn and understand patterns, not memorize answers!** [**Get lifetime access today →**](https://www.designgurus.io/course/grokking-the-coding-interview?aff=kJSIoU)
|
||||
|
||||
## Looking for Front End content?
|
||||
|
||||
|
@ -73,7 +78,7 @@ Front-end-related content has been moved to a separate website - [Front End Inte
|
|||
|
||||
## Looking for System Design content?
|
||||
|
||||
We're still working on System Design content. In the meanwhile, check out Educative's [Grokking the System Design Interview course](https://www.educative.io/courses/grokking-the-system-design-interview?aff=x23W), which in our opinion is one of the most useful resources for getting started on system design interviews preparation.
|
||||
We're still working on System Design content. In the meanwhile, check out [ByteByteGo's System Design Interview course](https://bytebytego.com?fpr=techinterviewhandbook) or Design Gurus' [Grokking the System Design Interview course](https://www.designgurus.io/course/grokking-the-system-design-interview?aff=kJSIoU), which in our opinion are among the most useful resources for getting started on system design interviews preparation.
|
||||
|
||||
## Contents
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# Algorithms
|
||||
|
||||
The contents have been moved to the [website](https://www.techinterviewhandbook.org/algorithms/introduction).
|
||||
The contents have been moved to the [website](https://www.techinterviewhandbook.org/algorithms/study-cheatsheet).
|
||||
|
||||
<!-- TODO: Remove in future -->
|
||||
|
|
|
@ -0,0 +1,14 @@
|
|||
# Prisma
|
||||
DATABASE_URL=postgresql://postgres:[PASSWORD]@localhost:5432/postgres
|
||||
|
||||
# Next Auth
|
||||
NEXTAUTH_SECRET=any_string_you_wish
|
||||
NEXTAUTH_URL=http://localhost:3000
|
||||
|
||||
# Next Auth GitHub Provider
|
||||
GITHUB_CLIENT_ID=a5164b1943b5413ff2f5
|
||||
GITHUB_CLIENT_SECRET=
|
||||
|
||||
# Supabase
|
||||
SUPABASE_URL=
|
||||
SUPABASE_ANON_KEY=
|
|
@ -0,0 +1,11 @@
|
|||
module.exports = {
|
||||
root: true,
|
||||
extends: ['tih'],
|
||||
parserOptions: {
|
||||
tsconfigRootDir: __dirname,
|
||||
project: ['./tsconfig.json'],
|
||||
},
|
||||
rules: {
|
||||
'@typescript-eslint/ban-ts-comment': 0,
|
||||
},
|
||||
};
|
|
@ -0,0 +1,40 @@
|
|||
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
|
||||
|
||||
# dependencies
|
||||
/node_modules
|
||||
/.pnp
|
||||
.pnp.js
|
||||
|
||||
# testing
|
||||
/coverage
|
||||
|
||||
# database
|
||||
/prisma/db.sqlite
|
||||
/prisma/db.sqlite-journal
|
||||
|
||||
# next.js
|
||||
/.next/
|
||||
/out/
|
||||
|
||||
# production
|
||||
/build
|
||||
|
||||
# misc
|
||||
.DS_Store
|
||||
*.pem
|
||||
|
||||
# debug
|
||||
npm-debug.log*
|
||||
yarn-debug.log*
|
||||
yarn-error.log*
|
||||
.pnpm-debug.log*
|
||||
|
||||
# local env files
|
||||
.env
|
||||
.env*.local
|
||||
|
||||
# vercel
|
||||
.vercel
|
||||
|
||||
# typescript
|
||||
*.tsbuildinfo
|
|
@ -0,0 +1,50 @@
|
|||
# Create T3 App
|
||||
|
||||
This is an app bootstrapped according to the [init.tips](https://init.tips) stack, also known as the T3-Stack.
|
||||
|
||||
## Why are there `.js` files in here?
|
||||
|
||||
As per [T3-Axiom #3](https://github.com/t3-oss/create-t3-app/tree/next#3-typesafety-isnt-optional), we take typesafety as a first class citizen. Unfortunately, not all frameworks and plugins support TypeScript which means some of the configuration files have to be `.js` files.
|
||||
|
||||
We try to emphasize that these files are javascript for a reason, by explicitly declaring its type (`cjs` or `mjs`) depending on what's supported by the library it is used by. Also, all the `js` files in this project are still typechecked using a `@ts-check` comment at the top.
|
||||
|
||||
## What's next? How do I make an app with this?
|
||||
|
||||
We try to keep this project as simple as possible, so you can start with the most basic configuration and then move on to more advanced configuration.
|
||||
|
||||
If you are not familiar with the different technologies used in this project, please refer to the respective docs. If you still are in the wind, please join our [Discord](https://t3.gg/discord) and ask for help.
|
||||
|
||||
- [Next-Auth.js](https://next-auth.js.org)
|
||||
- [Prisma](https://prisma.io)
|
||||
- [TailwindCSS](https://tailwindcss.com)
|
||||
- [tRPC](https://trpc.io) (using @next version? [see v10 docs here](https://trpc.io/docs/v10/))
|
||||
|
||||
Also checkout these awesome tutorials on `create-t3-app`.
|
||||
|
||||
- [Build a Blog With the T3 Stack - tRPC, TypeScript, Next.js, Prisma & Zod](https://www.youtube.com/watch?v=syEWlxVFUrY)
|
||||
- [Build a Live Chat Application with the T3 Stack - TypeScript, Tailwind, tRPC](https://www.youtube.com/watch?v=dXRRY37MPuk)
|
||||
- [Build a full stack app with create-t3-app](https://www.nexxel.dev/blog/ct3a-guestbook)
|
||||
- [A first look at create-t3-app](https://dev.to/ajcwebdev/a-first-look-at-create-t3-app-1i8f)
|
||||
|
||||
## How do I deploy this?
|
||||
|
||||
### Vercel
|
||||
|
||||
We recommend deploying to [Vercel](https://vercel.com/?utm_source=t3-oss&utm_campaign=oss). It makes it super easy to deploy NextJs apps.
|
||||
|
||||
- Push your code to a GitHub repository.
|
||||
- Go to [Vercel](https://vercel.com/?utm_source=t3-oss&utm_campaign=oss) and sign up with GitHub.
|
||||
- Create a Project and import the repository you pushed your code to.
|
||||
- Add your environment variables.
|
||||
- Click **Deploy**
|
||||
- Now whenever you push a change to your repository, Vercel will automatically redeploy your website!
|
||||
|
||||
### Docker
|
||||
|
||||
You can also dockerize this stack and deploy a container. See the [Docker deployment page](https://create-t3-app-nu.vercel.app/en/deployment/docker) for details.
|
||||
|
||||
## Useful resources
|
||||
|
||||
Here are some resources that we commonly refer to:
|
||||
|
||||
- [Protecting routes with Next-Auth.js](https://next-auth.js.org/configuration/nextjs#unstable_getserversession)
|
|
@ -0,0 +1,5 @@
|
|||
/// <reference types="next" />
|
||||
/// <reference types="next/image-types/global" />
|
||||
|
||||
// NOTE: This file should not be edited
|
||||
// see https://nextjs.org/docs/basic-features/typescript for more information.
|
|
@ -0,0 +1,21 @@
|
|||
import { env } from './src/env/server.mjs';
|
||||
|
||||
/**
|
||||
* Don't be scared of the generics here.
|
||||
* All they do is to give us autocompletion when using this.
|
||||
*
|
||||
* @template {import('next').NextConfig} T
|
||||
* @param {T} config - A generic parameter that flows through to the return type
|
||||
* @constraint {{import('next').NextConfig}}
|
||||
*/
|
||||
function defineNextConfig(config) {
|
||||
return config;
|
||||
}
|
||||
|
||||
export default defineNextConfig({
|
||||
experimental: {
|
||||
esmExternals: 'loose',
|
||||
},
|
||||
reactStrictMode: true,
|
||||
swcMinify: true,
|
||||
});
|
|
@ -0,0 +1,70 @@
|
|||
{
|
||||
"name": "@tih/portal",
|
||||
"version": "0.0.0",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"dev": "next dev",
|
||||
"build": "next build",
|
||||
"start": "next start",
|
||||
"lint": "next lint",
|
||||
"tsc": "tsc",
|
||||
"postinstall": "prisma generate",
|
||||
"seed": "ts-node prisma/seed.ts",
|
||||
"seed-salaries": "ts-node prisma/seed-salaries.ts",
|
||||
"seed-analysis": "ts-node prisma/seed-analysis.ts",
|
||||
"seed-questions": "ts-node prisma/seed-questions.ts",
|
||||
"seed-companies": "ts-node prisma/seed-companies.ts"
|
||||
},
|
||||
"dependencies": {
|
||||
"@headlessui/react": "^1.7.3",
|
||||
"@heroicons/react": "2.0.11",
|
||||
"@next-auth/prisma-adapter": "^1.0.4",
|
||||
"@popperjs/core": "^2.11.6",
|
||||
"@prisma/client": "^4.4.0",
|
||||
"@supabase/supabase-js": "^1.35.7",
|
||||
"@trpc/client": "^9.27.2",
|
||||
"@trpc/next": "^9.27.2",
|
||||
"@trpc/react": "^9.27.2",
|
||||
"@trpc/server": "^9.27.2",
|
||||
"axios": "^1.1.2",
|
||||
"clsx": "^1.2.1",
|
||||
"cross-fetch": "^3.1.5",
|
||||
"date-fns": "^2.29.3",
|
||||
"formidable": "^2.0.1",
|
||||
"next": "14.2.4",
|
||||
"next-auth": "~4.10.3",
|
||||
"node-fetch": "^3.2.10",
|
||||
"react": "18.2.0",
|
||||
"react-dom": "18.2.0",
|
||||
"react-dropzone": "^14.2.3",
|
||||
"react-hook-form": "^7.36.1",
|
||||
"react-pdf": "^5.7.2",
|
||||
"react-popper": "^2.3.0",
|
||||
"react-popper-tooltip": "^4.4.2",
|
||||
"react-query": "^3.39.2",
|
||||
"read-excel-file": "^5.5.3",
|
||||
"superjson": "^1.10.0",
|
||||
"unique-names-generator": "^4.7.1",
|
||||
"xlsx": "^0.18.5",
|
||||
"zod": "^3.18.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@tih/tailwind-config": "workspace:0.0.0",
|
||||
"@tih/tsconfig": "workspace:0.0.0",
|
||||
"@types/formidable": "^2.0.5",
|
||||
"@types/node": "^18.0.0",
|
||||
"@types/react": "18.0.28",
|
||||
"@types/react-dom": "18.0.11",
|
||||
"@types/react-pdf": "^5.7.2",
|
||||
"autoprefixer": "^10.4.12",
|
||||
"csv": "^6.2.2",
|
||||
"postcss": "^8.4.16",
|
||||
"prettier-plugin-tailwindcss": "^0.1.13",
|
||||
"prisma": "^4.4.0",
|
||||
"ts-node": "^10.9.1",
|
||||
"typescript": "4.8.3"
|
||||
},
|
||||
"ct3aMetadata": {
|
||||
"initVersion": "5.13.1"
|
||||
}
|
||||
}
|
|
@ -0,0 +1,6 @@
|
|||
module.exports = {
|
||||
plugins: {
|
||||
tailwindcss: {},
|
||||
autoprefixer: {},
|
||||
},
|
||||
};
|
|
@ -0,0 +1,265 @@
|
|||
name,slug,website,logoUrl,description,finalized
|
||||
3forge,3forge,3forge.com,https://logo.clearbit.com/3forge.com,,TRUE
|
||||
99.co,99.co,99.co,https://logo.clearbit.com/99.co,,TRUE
|
||||
"Agency for Science, Technology and Research (A*Star) Singapore",a-star-sg,a-star.edu.sg,https://logo.clearbit.com/a-star.edu.sg,,TRUE
|
||||
Accenture,accenture,accenture.com,https://logo.clearbit.com/accenture.com,,TRUE
|
||||
Accuracy,accuracy,accuracy.com,https://logo.clearbit.com/accuracy.com,,TRUE
|
||||
Acronis,acronis,acronis.com,https://logo.clearbit.com/acronis.com,,TRUE
|
||||
Agoda,agoda,agoda.com,https://logo.clearbit.com/agoda.com,,TRUE
|
||||
AlphaLab Capital,alphalab-capital,alphalab.capital,https://logo.clearbit.com/alphalab.capital,,TRUE
|
||||
Alstom,alstom,alstom.com,https://logo.clearbit.com/alstom.com,,TRUE
|
||||
Amaris AI Pte Ltd,amaris-ai-pte-ltd,amaris.ai,https://logo.clearbit.com/amaris.ai,,TRUE
|
||||
Amazon,amazon,amazon.com,https://logo.clearbit.com/amazon.com,"Amazon.com, Inc. is an American multinational technology company that focuses on e-commerce, cloud computing, digital streaming, and artificial intelligence.",TRUE
|
||||
Amazon Web Services,amazon-web-services,aws.amazon.com,https://logo.clearbit.com/aws.amazon.com,,TRUE
|
||||
AMD,amd,amd.com,https://logo.clearbit.com/amd.com,,TRUE
|
||||
Ant Group,ant-group,antgroup.com,https://logo.clearbit.com/antgroup.com,,TRUE
|
||||
Apple,apple,apple.com,https://logo.clearbit.com/apple.com,"Apple Inc. is an American multinational technology company that specializes in consumer electronics, software and online services headquartered in Cupertino, California, United States.",TRUE
|
||||
Ascenda,ascenda,ascendaloyalty.com,https://logo.clearbit.com/ascendaloyalty.com,,TRUE
|
||||
Atome,atome,atome.sg,https://logo.clearbit.com/atome.sg,,TRUE
|
||||
Autodesk,autodesk,autodesk.com,https://logo.clearbit.com/autodesk.com,,TRUE
|
||||
Avanade,avanade,avanade.com,https://logo.clearbit.com/avanade.com,,TRUE
|
||||
Bank of America,bank-of-america,bankofamerica.com,https://logo.clearbit.com/bankofamerica.com,,TRUE
|
||||
Bank of Singapore,bank-of-singapore,bankofsingapore.com,https://logo.clearbit.com/bankofsingapore.com,,TRUE
|
||||
betterdata,betterdata,betterdata.ai,https://logo.clearbit.com/betterdata.ai,,TRUE
|
||||
Binance,binance,binance.com,https://logo.clearbit.com/binance.com,,TRUE
|
||||
Bosch,bosch,bosch.com,https://logo.clearbit.com/bosch.com,,TRUE
|
||||
ByteDance,bytedance,bytedance.com,https://logo.clearbit.com/bytedance.com,,TRUE
|
||||
Carousell,carousell,carousell.com,https://logo.clearbit.com/carousell.com,,TRUE
|
||||
Carro,carro,carro.sg,https://logo.clearbit.com/carro.sg,,TRUE
|
||||
Circles.Life,circles.life,circles.life,https://logo.clearbit.com/circles.life,,TRUE
|
||||
Cisco,cisco,cisco.com,https://logo.clearbit.com/cisco.com,,TRUE
|
||||
Citadel,citadel,citadel.com,https://logo.clearbit.com/citadel.com,,TRUE
|
||||
CitiBank,citibank,citibank.com,https://logo.clearbit.com/citibank.com,,TRUE
|
||||
Cloudflare,cloudflare,cloudflare.com,https://logo.clearbit.com/cloudflare.com,,TRUE
|
||||
Coinhako,coinhako,coinhako.com,https://logo.clearbit.com/coinhako.com,,TRUE
|
||||
ComfortDelGro,comfortdelgro,comfortdelgro.com,https://logo.clearbit.com/comfortdelgro.com,,TRUE
|
||||
Constructor,constructor,constructor.io,https://logo.clearbit.com/constructor.io,,TRUE
|
||||
Continental,continental,continental.com,https://logo.clearbit.com/continental.com,,TRUE
|
||||
Creative,creative,creative.com,https://logo.clearbit.com/creative.com,,TRUE
|
||||
Credit Agricole,credit-agricole,ca-cib.com,https://logo.clearbit.com/ca-cib.com,,TRUE
|
||||
Credit Suisse,credit-suisse,credit-suisse.com,https://logo.clearbit.com/credit-suisse.com,,TRUE
|
||||
Crypto.com,crypto-com,crypto.com,https://logo.clearbit.com/crypto.com,,TRUE
|
||||
CSIT,csit,csit.gov.sg,https://logo.clearbit.com/csit.gov.sg,,TRUE
|
||||
Daiwa Capital Markets,daiwacm,daiwacm.com,https://logo.clearbit.com/daiwacm.com,,TRUE
|
||||
DBS,dbs,dbs.com,https://logo.clearbit.com/dbs.com,,TRUE
|
||||
Defence Science and Technology Agency (DSTA),dsta,dsta.gov.sg,https://logo.clearbit.com/dsta.gov.sg,,TRUE
|
||||
Dell,dell,dell.com,https://logo.clearbit.com/dell.com,,TRUE
|
||||
Deloitte,deloitte,deloitte.com,https://logo.clearbit.com/deloitte.com,,TRUE
|
||||
DHL,dhl,dhl.com,https://logo.clearbit.com/dhl.com,,TRUE
|
||||
DRW,drw,drw.com,https://logo.clearbit.com/drw.com,,TRUE
|
||||
DSO National Laboratories,dso-national-laboratories,www.dso.org.sg,https://logo.clearbit.com/www.dso.org.sg,,TRUE
|
||||
Dyson,dyson,dyson.com,https://logo.clearbit.com/dyson.com,,TRUE
|
||||
Energy Market Authority (EMA),energy-market-authority-(ema),ema.gov.sg,https://logo.clearbit.com/ema.gov.sg,,TRUE
|
||||
Ensign InfoSecurity,ensign-infosecurity,ensigninfosecurity.com,https://logo.clearbit.com/ensigninfosecurity.com,,TRUE
|
||||
Envision Digital,envision-digital,envision-digital.com,https://logo.clearbit.com/envision-digital.com,,TRUE
|
||||
Equinix,equinix,equinix.com,https://logo.clearbit.com/equinix.com,,TRUE
|
||||
Ernst and Young,ey,ey.com,https://logo.clearbit.com/ey.com,,TRUE
|
||||
ExpressVPN,expressvpn,expressvpn.com,https://logo.clearbit.com/expressvpn.com,,TRUE
|
||||
F5 Networks,f5,f5networks.com,https://logo.clearbit.com/f5networks.com,,TRUE
|
||||
Foodpanda,foodpanda,foodpanda.com,https://logo.clearbit.com/foodpanda.com,,TRUE
|
||||
Garena,garena,garena.com,https://logo.clearbit.com/garena.com,,TRUE
|
||||
GIC Singapore,gic-singapore,gic.com.sg,https://logo.clearbit.com/gic.com.sg,,TRUE
|
||||
GlobalFoundries,globalfoundries,globalfoundries.com,https://logo.clearbit.com/globalfoundries.com,,TRUE
|
||||
Goldman Sachs,goldman-sachs,goldmansachs.com,https://logo.clearbit.com/goldmansachs.com,,TRUE
|
||||
Google,google,google.com,https://logo.clearbit.com/google.com,"Google LLC is an American multinational technology company that focuses on search engine technology, online advertising, cloud computing, computer software, quantum computing, e-commerce, artificial intelligence, and consumer electronics.",TRUE
|
||||
GovTech Singapore,govtech-singapore,tech.gov.sg,https://logo.clearbit.com/tech.gov.sg,,TRUE
|
||||
Grab,grab,grab.com,https://logo.clearbit.com/grab.com,,TRUE
|
||||
Grasshopper,grasshopper,grasshopper.com,https://logo.clearbit.com/grasshopper.com,,TRUE
|
||||
Hewlett Packard (HP),hp,hp.com,https://logo.clearbit.com/hp.com,,TRUE
|
||||
Hitachi Vantara,hitachi-vantara,hitachivantara.com,https://logo.clearbit.com/hitachivantara.com,,TRUE
|
||||
Hodlnaut,hodlnaut,hodlnaut.com,https://logo.clearbit.com/hodlnaut.com,,TRUE
|
||||
Home Team Science and Technology Agency Singapore,htx-sg,htx.gov.sg,https://logo.clearbit.com/htx.gov.sg,,TRUE
|
||||
HOPE Technik,hope-technik,hopetechnik.com,https://logo.clearbit.com/hopetechnik.com,,TRUE
|
||||
Housing Development Board (HDB) Singapore,hdb-sg,hdb.gov.sg,https://logo.clearbit.com/hdb.gov.sg,,TRUE
|
||||
Huawei,huawei,huawei.com,https://logo.clearbit.com/huawei.com,,TRUE
|
||||
Hypotenuse AI,hypotenuse-ai,hypotenuse.ai,https://logo.clearbit.com/hypotenuse.ai,,TRUE
|
||||
IBM,ibm,ibm.com,https://logo.clearbit.com/ibm.com,,TRUE
|
||||
IDEMIA,idemia,idemia.com,https://logo.clearbit.com/idemia.com,,TRUE
|
||||
Illumina,illumina,illumina.com,https://logo.clearbit.com/illumina.com,,TRUE
|
||||
Income (NTUC) Singapore,ntuc-income-sg,income.com.sg,https://logo.clearbit.com/income.com.sg,,TRUE
|
||||
Indeed,indeed,indeed.com,https://logo.clearbit.com/indeed.com,,TRUE
|
||||
Infineon,infineon,infineon.com,https://logo.clearbit.com/infineon.com,,TRUE
|
||||
Infocomm Media Development Authority (IMDA) Singapore,imda-sg,imda.gov.sg,https://logo.clearbit.com/imda.gov.sg,,TRUE
|
||||
Integrated Health Information Systems (IHIS) Singapore,ihis-sg,ihis.com.sg,https://logo.clearbit.com/ihis.com.sg,,TRUE
|
||||
J.P. Morgan (JP Morgan),jp-morgan,jpmorgan.com,https://logo.clearbit.com/jpmorgan.com,,TRUE
|
||||
Jane Street,jane-street,janestreet.com,https://logo.clearbit.com/janestreet.com,,TRUE
|
||||
Johnson & Johnson,jnj,jnj.com,https://logo.clearbit.com/jnj.com,,TRUE
|
||||
Jump Trading,jump-trading,jumptrading.com,https://logo.clearbit.com/jumptrading.com,,TRUE
|
||||
KPMG,kpmg,kpmg.com,https://logo.clearbit.com/kpmg.com,,TRUE
|
||||
Lazada,lazada,lazada.com,https://logo.clearbit.com/lazada.com,,TRUE
|
||||
Mandiant,mandiant,mandiant.com,https://logo.clearbit.com/mandiant.com,,TRUE
|
||||
Meta,meta,meta.com,https://logo.clearbit.com/meta.com,"Meta Platforms, Inc., doing business as Meta and formerly named Facebook, Inc., and TheFacebook, Inc., is an American multinational technology conglomerate based in Menlo Park, California. The company owns Facebook, Instagram, and WhatsApp, among other products and services.",TRUE
|
||||
Micron,micron,micron.com,https://logo.clearbit.com/micron.com,,TRUE
|
||||
Microsoft,microsoft,microsoft.com,https://logo.clearbit.com/microsoft.com,"Microsoft Corporation is an American multinational technology corporation which produces computer software, consumer electronics, personal computers, and related services headquartered at the Microsoft Redmond campus located in Redmond, Washington, United States.",TRUE
|
||||
Millennium Management,mlp,mlp.com,https://logo.clearbit.com/mlp.com,,TRUE
|
||||
Monetary Authority of Singapore,mas-sg,mas.gov.sg,https://logo.clearbit.com/mas.gov.sg,,TRUE
|
||||
Morgan Stanley,morgan-stanley,morganstanley.com,https://logo.clearbit.com/morganstanley.com,,TRUE
|
||||
Motional,motional,motional.com,https://logo.clearbit.com/motional.com,,TRUE
|
||||
NCS,ncs,ncs.co,https://logo.clearbit.com/ncs.co,,TRUE
|
||||
NE Digital (NTUC) Singapore,ne-digital-sg,nedigital.sg,https://logo.clearbit.com/nedigital.sg,,TRUE
|
||||
Netflix,netflix,netflix.com,https://logo.clearbit.com/netflix.com,,TRUE
|
||||
Ninja Van,ninja-van,ninjavan.co,https://logo.clearbit.com/ninjavan.co,,TRUE
|
||||
OCBC,ocbc,ocbc.com,https://logo.clearbit.com/ocbc.com,,TRUE
|
||||
Open Government Products (OGP),open-government-products-(ogp),ogp.gov.sg,https://logo.clearbit.com/ogp.gov.sg,,TRUE
|
||||
Optiver,optiver,optiver.com,https://logo.clearbit.com/optiver.com,,TRUE
|
||||
Pactera Edge,pactera-edge,pacteraedge.com,https://logo.clearbit.com/pacteraedge.com,,TRUE
|
||||
Panasonic,panasonic,panasonic.com,https://logo.clearbit.com/panasonic.com,,TRUE
|
||||
PayPal,paypal,paypal.com,https://logo.clearbit.com/paypal.com,,TRUE
|
||||
PricewaterhouseCoopers (PwC),pwc,pwc.com,https://logo.clearbit.com/pwc.com,,TRUE
|
||||
Procter & Gamble (P&G),pg,pg.com,https://logo.clearbit.com/pg.com,,TRUE
|
||||
PSA Singapore,psa-singapore,singaporepsa.com,https://logo.clearbit.com/singaporepsa.com,,TRUE
|
||||
QuantEdge,quantedge,quantedge.com,https://logo.clearbit.com/quantedge.com,,TRUE
|
||||
Rakuten,rakuten,rakuten.com,https://logo.clearbit.com/rakuten.com,,TRUE
|
||||
Ramco,ramco,ramco.com,https://logo.clearbit.com/ramco.com,,TRUE
|
||||
Razer,razer,razer.com,https://logo.clearbit.com/razer.com,,TRUE
|
||||
Riot Games,riot-games,riotgames.com,https://logo.clearbit.com/riotgames.com,,TRUE
|
||||
SAP,sap,sap.com,https://logo.clearbit.com/sap.com,,TRUE
|
||||
Schneider Electric Pte Ltd,se,se.com,https://logo.clearbit.com/se.com,,TRUE
|
||||
Schroders,schroders,schroders.com,https://logo.clearbit.com/schroders.com,,TRUE
|
||||
Sea Group,sea-group,sea.com,https://logo.clearbit.com/sea.com,,TRUE
|
||||
Seagate,seagate,seagate.com,https://logo.clearbit.com/seagate.com,,TRUE
|
||||
SenseTime,sensetime,sensetime.com,https://logo.clearbit.com/sensetime.com,,TRUE
|
||||
Sentient.io,sentient-io,sentient.io.com,https://logo.clearbit.com/sentient.io.com,,TRUE
|
||||
SGInnovate,sginnovate,sginnovate.com,https://logo.clearbit.com/sginnovate.com,,TRUE
|
||||
Shop,shop,shop.com,https://logo.clearbit.com/shop.com,,TRUE
|
||||
ShopBack,shopback,shopback.com,https://logo.clearbit.com/shopback.com,,TRUE
|
||||
Shopee,shopee,shopee.com,https://logo.clearbit.com/shopee.com,,TRUE
|
||||
Siemens,siemens,siemens.com,https://logo.clearbit.com/siemens.com,,TRUE
|
||||
Singapore Airlines (SIA),singaporeair,singaporeair.com.sg,,,TRUE
|
||||
Singapore Armed Forces (MINDEF SAF),singapore-armed-forces-(mindef-saf),mindef.gov.sg,https://logo.clearbit.com/mindef.gov.sg,,TRUE
|
||||
Singapore Institute of Technology (SIT),sit-sg,singaporetech.edu.sg,https://logo.clearbit.com/singaporetech.edu.sg,,TRUE
|
||||
SingTel,singtel,singtel.com,https://logo.clearbit.com/singtel.com,,TRUE
|
||||
Skyline Communications,skyline-communications,skyline.be,https://logo.clearbit.com/skyline.be,,TRUE
|
||||
Sprinklr,sprinklr,sprinklr.com,https://logo.clearbit.com/sprinklr.com,,TRUE
|
||||
Squarepoint Capital,squarepoint-capital,squarepoint-capital.com,https://logo.clearbit.com/squarepoint-capital.com,,TRUE
|
||||
ST Engineering (Singapore),stengg,stengg.com,https://logo.clearbit.com/stengg.com,,TRUE
|
||||
Standard Chartered,standard-chartered,standardchartered.com,https://logo.clearbit.com/standardchartered.com,,TRUE
|
||||
StashAway,stashaway,stashaway.sg,https://logo.clearbit.com/stashaway.sg,,TRUE
|
||||
Stripe,stripe,stripe.com,https://logo.clearbit.com/stripe.com,,TRUE
|
||||
Syngenta,syngenta,syngenta.com,https://logo.clearbit.com/syngenta.com,,TRUE
|
||||
Tesla,tesla,tesla.com,https://logo.clearbit.com/tesla.com,,TRUE
|
||||
Thales,thales,thales.com,https://logo.clearbit.com/thales.com,,TRUE
|
||||
Thermo Fisher,thermo-fisher,thermofisher.com,https://logo.clearbit.com/thermofisher.com,,TRUE
|
||||
Thoughtworks,thoughtworks,thoughtworks.com,https://logo.clearbit.com/thoughtworks.com,,TRUE
|
||||
TikTok,tiktok,tiktok.com,https://logo.clearbit.com/tiktok.com,,TRUE
|
||||
Titansoft,titansoft,titansoft.com,https://logo.clearbit.com/titansoft.com,,TRUE
|
||||
Trail of Bits,trail-of-bits,trailofbits.com,https://logo.clearbit.com/trailofbits.com,,TRUE
|
||||
Trust (Bank),trust-bank,trustbank.sg,https://logo.clearbit.com/trustbank.sg,,TRUE
|
||||
Trustana,trustana,trustana.com,https://logo.clearbit.com/trustana.com,,TRUE
|
||||
Ubisoft,ubisoft,ubisoft.com,https://logo.clearbit.com/ubisoft.com,,TRUE
|
||||
Ubisoft Singapore,ubisoft-singapore,ubisoftsingapore.com,https://logo.clearbit.com/ubisoftsingapore.com,,TRUE
|
||||
UCARS,ucars,ucars.com,https://logo.clearbit.com/ucars.com,,TRUE
|
||||
UOB,uob,uob.com,https://logo.clearbit.com/uob.com,,TRUE
|
||||
Viki,viki,viki.com,https://logo.clearbit.com/viki.com,,TRUE
|
||||
Virtu Financial,virtu-financial,virtu.com,https://logo.clearbit.com/virtu.com,,TRUE
|
||||
Visa,visa,visa.com,https://logo.clearbit.com/visa.com,,TRUE
|
||||
Wintermute,wintermute,wintermute.com,https://logo.clearbit.com/wintermute.com,,TRUE
|
||||
Wise,wise,wise.com,https://logo.clearbit.com/wise.com,,TRUE
|
||||
Workato,workato,workato.com,https://logo.clearbit.com/workato.com,,TRUE
|
||||
WorkClass,WorkClass,workclass.co,https://logo.clearbit.com/workclass.co,,TRUE
|
||||
Zendesk,zendesk,zendesk.com,https://logo.clearbit.com/zendesk.com,,TRUE
|
||||
D.E. Shaw,deshaw,deshaw.com,https://logo.clearbit.com/deshaw.com,,TRUE
|
||||
Five Rings,five-rings,fiverings.com,https://logo.clearbit.com/fiverings.com,,TRUE
|
||||
Databricks,databricks,databricks.com,https://logo.clearbit.com/databricks.com,,TRUE
|
||||
Scale AI,scale-ai,scale.com,https://logo.clearbit.com/scale.com,,TRUE
|
||||
Snap,snap,snap.com,https://logo.clearbit.com/snap.com,,TRUE
|
||||
Two Sigma,two-sigma,twosigma.com,https://logo.clearbit.com/twosigma.com,,TRUE
|
||||
Roblox,roblox,roblox.com,https://logo.clearbit.com/roblox.com,,TRUE
|
||||
Airbnb,airbnb,airbnb.com,https://logo.clearbit.com/airbnb.com,,TRUE
|
||||
Lyft,lyft,lyft.com,https://logo.clearbit.com/lyft.com,,TRUE
|
||||
IMC Trading,imc-trading,imc.com,https://logo.clearbit.com/imc.com,,TRUE
|
||||
Asana,asana,asana.com,https://logo.clearbit.com/asana.com,,TRUE
|
||||
Robinhood,robinhood,robinhood.com,https://logo.clearbit.com/robinhood.com,,TRUE
|
||||
Figma,figma,figma.com,https://logo.clearbit.com/figma.com,,TRUE
|
||||
Coinbase,coinbase,coinbase.com,https://logo.clearbit.com/coinbase.com,,TRUE
|
||||
Palantir,palantir,palantir.com,https://logo.clearbit.com/palantir.com,,TRUE
|
||||
Confluent,confluent,confluent.io,https://logo.clearbit.com/confluent.io,,TRUE
|
||||
Hudson River Trading,hudson-river-trading,hudsonrivertrading.com,https://logo.clearbit.com/hudsonrivertrading.com,,TRUE
|
||||
Akuna Capital,akuna-capital,akunacapital.com,https://logo.clearbit.com/akunacapital.com,,TRUE
|
||||
Uber,uber,uber.com,https://logo.clearbit.com/uber.com,,TRUE
|
||||
Pinterest,pinterest,pinterest.com,https://logo.clearbit.com/pinterest.com,,TRUE
|
||||
Github,github,github.com,https://logo.clearbit.com/github.com,,TRUE
|
||||
Slack,slack,slack.com,https://logo.clearbit.com/slack.com,,TRUE
|
||||
Square,square,square.com,https://logo.clearbit.com/square.com,,TRUE
|
||||
Doordash,doordash,doordash.com,https://logo.clearbit.com/doordash.com,,TRUE
|
||||
Linkedin,linkedin,linkedin.com,https://logo.clearbit.com/linkedin.com,,TRUE
|
||||
Instacart,instacart,instacart.com,https://logo.clearbit.com/instacart.com,,TRUE
|
||||
Datadog,datadog,datadog.com,https://logo.clearbit.com/datadog.com,,TRUE
|
||||
Twitter,twitter,twitter.com,https://logo.clearbit.com/twitter.com,,TRUE
|
||||
Chime,chime,chime.com,https://logo.clearbit.com/chime.com,,TRUE
|
||||
Nvidia,nvidia,nvidia.com,https://logo.clearbit.com/nvidia.com,,TRUE
|
||||
Aurora,aurora,aurora.tech,https://logo.clearbit.com/aurora.tech,,TRUE
|
||||
Twitch,twitch,twitch.com,https://logo.clearbit.com/twitch.com,,TRUE
|
||||
MongoDB,mongodb,mongodb.com,https://logo.clearbit.com/mongodb.com,,TRUE
|
||||
Salesforce,salesforce,salesforce.com,https://logo.clearbit.com/salesforce.com,,TRUE
|
||||
Tableau,tableau,tableau.com,https://logo.clearbit.com/tableau.com,,TRUE
|
||||
Bloomberg,bloomberg,bloomberg.com,https://logo.clearbit.com/bloomberg.com,,TRUE
|
||||
Reddit,reddit,reddit.com,https://logo.clearbit.com/reddit.com,,TRUE
|
||||
Nextdoor,nextdoor,nextdoor.com,https://logo.clearbit.com/nextdoor.com,,TRUE
|
||||
Argo Ai,argo-ai,argo.ai,https://logo.clearbit.com/argo.ai,,TRUE
|
||||
Wish,wish,wish.com,https://logo.clearbit.com/wish.com,,TRUE
|
||||
Zoom,zoom,zoom.com,https://logo.clearbit.com/zoom.com,,TRUE
|
||||
Atlasssian,atlasssian,atlasssian.com,https://logo.clearbit.com/atlasssian.com,,TRUE
|
||||
Twilio,twilio,twilio.com,https://logo.clearbit.com/twilio.com,,TRUE
|
||||
Snowflake,snowflake,snowflake.com,https://logo.clearbit.com/snowflake.com,,TRUE
|
||||
Dropbox,dropbox,dropbox.com,https://logo.clearbit.com/dropbox.com,,TRUE
|
||||
Qualtrics,qualtrics,qualtrics.com,https://logo.clearbit.com/qualtrics.com,,TRUE
|
||||
HubSpot,hubspot,hubspot.com,https://logo.clearbit.com/hubspot.com,,TRUE
|
||||
Peleton,peleton,onepeleton.com,https://logo.clearbit.com/onepeleton.com,,TRUE
|
||||
Adobe,adobe,adobe.com,https://logo.clearbit.com/adobe.com,,TRUE
|
||||
Splunk,splunk,splunk.com,https://logo.clearbit.com/splunk.com,,TRUE
|
||||
Postmates,postmates,postmates.com,https://logo.clearbit.com/postmates.com,,TRUE
|
||||
Coursera,coursera,coursera.com,https://logo.clearbit.com/coursera.com,,TRUE
|
||||
Niantic Labs,niantic-labs,nianticlabs.com,https://logo.clearbit.com/nianticlabs.com,,TRUE
|
||||
Audible,audible,audible.com,https://logo.clearbit.com/audible.com,,TRUE
|
||||
Samsung,samsung,samsung.com,https://logo.clearbit.com/samsung.com,,TRUE
|
||||
Shopify,shopify,shopify.com,https://logo.clearbit.com/shopify.com,,TRUE
|
||||
VMware,vmware,vmware.com,https://logo.clearbit.com/vmware.com,,TRUE
|
||||
Zillow,zillow,zillow.com,https://logo.clearbit.com/zillow.com,,TRUE
|
||||
Spotify,spotify,spotify.com,https://logo.clearbit.com/spotify.com,,TRUE
|
||||
Cisco Merkari,cisco-merkari,meraki.cisco.com,https://logo.clearbit.com/meraki.cisco.com,,TRUE
|
||||
Instabase,instabase,instabase.com,https://logo.clearbit.com/instabase.com,,TRUE
|
||||
Yext,yext,yext.com,https://logo.clearbit.com/yext.com,,TRUE
|
||||
Disney,disney,disney.com,https://logo.clearbit.com/disney.com,,TRUE
|
||||
Hulu,hulu,hulu.com,https://logo.clearbit.com/hulu.com,,TRUE
|
||||
GrubHub,grubhub,grubhub.com,https://logo.clearbit.com/grubhub.com,,TRUE
|
||||
Duolingo,duolingo,duolingo.com,https://logo.clearbit.com/duolingo.com,,TRUE
|
||||
Roku,roku,roku.com,https://logo.clearbit.com/roku.com,,TRUE
|
||||
Okta,okta,okta.com,https://logo.clearbit.com/okta.com,,TRUE
|
||||
Palo Alto Software,palo-alto-software,paloaltosoftware.com,https://logo.clearbit.com/paloaltosoftware.com,,TRUE
|
||||
Palo Alto Networks,palo-alto-networks,paloaltonetworks.com,https://logo.clearbit.com/paloaltonetworks.com,,FALSE
|
||||
Oracle,oracle,oracle.com,https://logo.clearbit.com/oracle.com,,TRUE
|
||||
Red Hat,red-hat,redhat.com,https://logo.clearbit.com/redhat.com,,TRUE
|
||||
Intuit,intuit,intuit.com,https://logo.clearbit.com/intuit.com,,TRUE
|
||||
Box,box,box.com,https://logo.clearbit.com/box.com,,TRUE
|
||||
Yelp,yelp,yelp.com,https://logo.clearbit.com/yelp.com,,TRUE
|
||||
Docusign,docusign,docusign.com,https://logo.clearbit.com/docusign.com,,TRUE
|
||||
Etsy,etsy,etsy.com,https://logo.clearbit.com/etsy.com,,TRUE
|
||||
Quora,quora,quora.com,https://logo.clearbit.com/quora.com,,TRUE
|
||||
SquareSpace,squarespace,squarespace.com,https://logo.clearbit.com/squarespace.com,,TRUE
|
||||
Expedia,expedia,expedia.com,https://logo.clearbit.com/expedia.com,,TRUE
|
||||
Chewy,chewy,chewy.com,https://logo.clearbit.com/chewy.com,,TRUE
|
||||
Intel,intel,intel.com,https://logo.clearbit.com/intel.com,,TRUE
|
||||
Capital One,capital-one,capitalone.com,https://logo.clearbit.com/capitalone.com,,TRUE
|
||||
American Express,american-express,americanexpress.com,https://logo.clearbit.com/americanexpress.com,,TRUE
|
||||
Blackrock,blackrock,blackrock.com,https://logo.clearbit.com/blackrock.com,,TRUE
|
||||
Walmart Labs,walmart-labs,walmartlabs.com,https://logo.clearbit.com/walmartlabs.com,,TRUE
|
||||
Workday,workday,workday.com,https://logo.clearbit.com/workday.com,,TRUE
|
||||
SAP,sap,sap.com,https://logo.clearbit.com/sap.com,,TRUE
|
||||
Pure Storage,pure-storage,purestorage.com,https://logo.clearbit.com/purestorage.com,,TRUE
|
||||
Nordstrom,nordstrom,nordstrom.com,https://logo.clearbit.com/nordstrom.com,,TRUE
|
||||
Groupon,groupon,groupon.com,https://logo.clearbit.com/groupon.com,,TRUE
|
||||
Norton Lifelock,norton-lifelock,nortonlifelock.com,https://logo.clearbit.com/nortonlifelock.com,,TRUE
|
||||
Yahoo,yahoo,yahoo.com,https://logo.clearbit.com/yahoo.com,,TRUE
|
||||
PNC Financial Services,pnc-financial-services,pnc.com,https://logo.clearbit.com/pnc.com,,TRUE
|
||||
NetApp,netapp,netapp.com,https://logo.clearbit.com/netapp.com,,TRUE
|
||||
GoDaddy,godaddy,godaddy.com,https://logo.clearbit.com/godaddy.com,,TRUE
|
||||
Wipro,wipro,wipro.com,https://logo.clearbit.com/wipro.com,,TRUE
|
||||
Infosys,infosys,infosys.com,https://logo.clearbit.com/infosys.com,,TRUE
|
||||
TCS,tcs,tcs.com,https://logo.clearbit.com/tcs.com,,TRUE
|
||||
Cognizant,cognizant,cognizant.com,https://logo.clearbit.com/cognizant.com,,TRUE
|
||||
HCL,hcl,hcl.com,https://logo.clearbit.com/hcl.com,,TRUE
|
||||
Tech Mahindra,tech-mahindra,techmahindra.com,https://logo.clearbit.com/techmahindra.com,,TRUE
|
||||
Fujitsu,fujitsu,fujitsu.com,https://logo.clearbit.com/fujitsu.com,,TRUE
|
||||
NIIT,niit,niit.com,https://logo.clearbit.com/niit.com,,TRUE
|
||||
Larson & Toubro (L&T),larson-toubro,larsentoubro.com,https://logo.clearbit.com/larsentoubro.com,,TRUE
|
|
|
@ -0,0 +1,410 @@
|
|||
{
|
||||
"data": [
|
||||
{ "country_id": "1", "sortname": "AF", "country_name": "Afghanistan" },
|
||||
{ "country_id": "2", "sortname": "AL", "country_name": "Albania" },
|
||||
{ "country_id": "3", "sortname": "DZ", "country_name": "Algeria" },
|
||||
{ "country_id": "4", "sortname": "AS", "country_name": "American Samoa" },
|
||||
{ "country_id": "5", "sortname": "AD", "country_name": "Andorra" },
|
||||
{ "country_id": "6", "sortname": "AO", "country_name": "Angola" },
|
||||
{ "country_id": "7", "sortname": "AI", "country_name": "Anguilla" },
|
||||
{ "country_id": "8", "sortname": "AQ", "country_name": "Antarctica" },
|
||||
{
|
||||
"country_id": "9",
|
||||
"sortname": "AG",
|
||||
"country_name": "Antigua And Barbuda"
|
||||
},
|
||||
{ "country_id": "10", "sortname": "AR", "country_name": "Argentina" },
|
||||
{ "country_id": "11", "sortname": "AM", "country_name": "Armenia" },
|
||||
{ "country_id": "12", "sortname": "AW", "country_name": "Aruba" },
|
||||
{ "country_id": "13", "sortname": "AU", "country_name": "Australia" },
|
||||
{ "country_id": "14", "sortname": "AT", "country_name": "Austria" },
|
||||
{ "country_id": "15", "sortname": "AZ", "country_name": "Azerbaijan" },
|
||||
{ "country_id": "16", "sortname": "BS", "country_name": "The Bahamas" },
|
||||
{ "country_id": "17", "sortname": "BH", "country_name": "Bahrain" },
|
||||
{ "country_id": "18", "sortname": "BD", "country_name": "Bangladesh" },
|
||||
{ "country_id": "19", "sortname": "BB", "country_name": "Barbados" },
|
||||
{ "country_id": "20", "sortname": "BY", "country_name": "Belarus" },
|
||||
{ "country_id": "21", "sortname": "BE", "country_name": "Belgium" },
|
||||
{ "country_id": "22", "sortname": "BZ", "country_name": "Belize" },
|
||||
{ "country_id": "23", "sortname": "BJ", "country_name": "Benin" },
|
||||
{ "country_id": "24", "sortname": "BM", "country_name": "Bermuda" },
|
||||
{ "country_id": "25", "sortname": "BT", "country_name": "Bhutan" },
|
||||
{ "country_id": "26", "sortname": "BO", "country_name": "Bolivia" },
|
||||
{
|
||||
"country_id": "27",
|
||||
"sortname": "BA",
|
||||
"country_name": "Bosnia and Herzegovina"
|
||||
},
|
||||
{ "country_id": "28", "sortname": "BW", "country_name": "Botswana" },
|
||||
{ "country_id": "29", "sortname": "BV", "country_name": "Bouvet Island" },
|
||||
{ "country_id": "30", "sortname": "BR", "country_name": "Brazil" },
|
||||
{
|
||||
"country_id": "31",
|
||||
"sortname": "IO",
|
||||
"country_name": "British Indian Ocean Territory"
|
||||
},
|
||||
{ "country_id": "32", "sortname": "BN", "country_name": "Brunei" },
|
||||
{ "country_id": "33", "sortname": "BG", "country_name": "Bulgaria" },
|
||||
{ "country_id": "34", "sortname": "BF", "country_name": "Burkina Faso" },
|
||||
{ "country_id": "35", "sortname": "BI", "country_name": "Burundi" },
|
||||
{ "country_id": "36", "sortname": "KH", "country_name": "Cambodia" },
|
||||
{ "country_id": "37", "sortname": "CM", "country_name": "Cameroon" },
|
||||
{ "country_id": "38", "sortname": "CA", "country_name": "Canada" },
|
||||
{ "country_id": "39", "sortname": "CV", "country_name": "Cape Verde" },
|
||||
{ "country_id": "40", "sortname": "KY", "country_name": "Cayman Islands" },
|
||||
{
|
||||
"country_id": "41",
|
||||
"sortname": "CF",
|
||||
"country_name": "Central African Republic"
|
||||
},
|
||||
{ "country_id": "42", "sortname": "TD", "country_name": "Chad" },
|
||||
{ "country_id": "43", "sortname": "CL", "country_name": "Chile" },
|
||||
{ "country_id": "44", "sortname": "CN", "country_name": "China" },
|
||||
{
|
||||
"country_id": "45",
|
||||
"sortname": "CX",
|
||||
"country_name": "Christmas Island"
|
||||
},
|
||||
{
|
||||
"country_id": "46",
|
||||
"sortname": "CC",
|
||||
"country_name": "Cocos (Keeling) Islands"
|
||||
},
|
||||
{ "country_id": "47", "sortname": "CO", "country_name": "Colombia" },
|
||||
{ "country_id": "48", "sortname": "KM", "country_name": "Comoros" },
|
||||
{ "country_id": "49", "sortname": "CG", "country_name": "Congo" },
|
||||
{
|
||||
"country_id": "50",
|
||||
"sortname": "CD",
|
||||
"country_name": "Democratic Republic of The Congo"
|
||||
},
|
||||
{ "country_id": "51", "sortname": "CK", "country_name": "Cook Islands" },
|
||||
{ "country_id": "52", "sortname": "CR", "country_name": "Costa Rica" },
|
||||
{
|
||||
"country_id": "53",
|
||||
"sortname": "CI",
|
||||
"country_name": "Cote D'Ivoire (Ivory Coast)"
|
||||
},
|
||||
{
|
||||
"country_id": "54",
|
||||
"sortname": "HR",
|
||||
"country_name": "Croatia (Hrvatska)"
|
||||
},
|
||||
{ "country_id": "55", "sortname": "CU", "country_name": "Cuba" },
|
||||
{ "country_id": "56", "sortname": "CY", "country_name": "Cyprus" },
|
||||
{ "country_id": "57", "sortname": "CZ", "country_name": "Czech Republic" },
|
||||
{ "country_id": "58", "sortname": "DK", "country_name": "Denmark" },
|
||||
{ "country_id": "59", "sortname": "DJ", "country_name": "Djibouti" },
|
||||
{ "country_id": "60", "sortname": "DM", "country_name": "Dominica" },
|
||||
{
|
||||
"country_id": "61",
|
||||
"sortname": "DO",
|
||||
"country_name": "Dominican Republic"
|
||||
},
|
||||
{ "country_id": "62", "sortname": "TP", "country_name": "East Timor" },
|
||||
{ "country_id": "63", "sortname": "EC", "country_name": "Ecuador" },
|
||||
{ "country_id": "64", "sortname": "EG", "country_name": "Egypt" },
|
||||
{ "country_id": "65", "sortname": "SV", "country_name": "El Salvador" },
|
||||
{
|
||||
"country_id": "66",
|
||||
"sortname": "GQ",
|
||||
"country_name": "Equatorial Guinea"
|
||||
},
|
||||
{ "country_id": "67", "sortname": "ER", "country_name": "Eritrea" },
|
||||
{ "country_id": "68", "sortname": "EE", "country_name": "Estonia" },
|
||||
{ "country_id": "69", "sortname": "ET", "country_name": "Ethiopia" },
|
||||
{
|
||||
"country_id": "70",
|
||||
"sortname": "XA",
|
||||
"country_name": "External Territories of Australia"
|
||||
},
|
||||
{
|
||||
"country_id": "71",
|
||||
"sortname": "FK",
|
||||
"country_name": "Falkland Islands"
|
||||
},
|
||||
{ "country_id": "72", "sortname": "FO", "country_name": "Faroe Islands" },
|
||||
{ "country_id": "73", "sortname": "FJ", "country_name": "Fiji Islands" },
|
||||
{ "country_id": "74", "sortname": "FI", "country_name": "Finland" },
|
||||
{ "country_id": "75", "sortname": "FR", "country_name": "France" },
|
||||
{ "country_id": "76", "sortname": "GF", "country_name": "French Guiana" },
|
||||
{
|
||||
"country_id": "77",
|
||||
"sortname": "PF",
|
||||
"country_name": "French Polynesia"
|
||||
},
|
||||
{
|
||||
"country_id": "78",
|
||||
"sortname": "TF",
|
||||
"country_name": "French Southern Territories"
|
||||
},
|
||||
{ "country_id": "79", "sortname": "GA", "country_name": "Gabon" },
|
||||
{ "country_id": "80", "sortname": "GM", "country_name": "The Gambia" },
|
||||
{ "country_id": "81", "sortname": "GE", "country_name": "Georgia" },
|
||||
{ "country_id": "82", "sortname": "DE", "country_name": "Germany" },
|
||||
{ "country_id": "83", "sortname": "GH", "country_name": "Ghana" },
|
||||
{ "country_id": "84", "sortname": "GI", "country_name": "Gibraltar" },
|
||||
{ "country_id": "85", "sortname": "GR", "country_name": "Greece" },
|
||||
{ "country_id": "86", "sortname": "GL", "country_name": "Greenland" },
|
||||
{ "country_id": "87", "sortname": "GD", "country_name": "Grenada" },
|
||||
{ "country_id": "88", "sortname": "GP", "country_name": "Guadeloupe" },
|
||||
{ "country_id": "89", "sortname": "GU", "country_name": "Guam" },
|
||||
{ "country_id": "90", "sortname": "GT", "country_name": "Guatemala" },
|
||||
{
|
||||
"country_id": "91",
|
||||
"sortname": "XU",
|
||||
"country_name": "Guernsey and Alderney"
|
||||
},
|
||||
{ "country_id": "92", "sortname": "GN", "country_name": "Guinea" },
|
||||
{ "country_id": "93", "sortname": "GW", "country_name": "Guinea-Bissau" },
|
||||
{ "country_id": "94", "sortname": "GY", "country_name": "Guyana" },
|
||||
{ "country_id": "95", "sortname": "HT", "country_name": "Haiti" },
|
||||
{
|
||||
"country_id": "96",
|
||||
"sortname": "HM",
|
||||
"country_name": "Heard and McDonald Islands"
|
||||
},
|
||||
{ "country_id": "97", "sortname": "HN", "country_name": "Honduras" },
|
||||
{
|
||||
"country_id": "98",
|
||||
"sortname": "HK",
|
||||
"country_name": "Hong Kong"
|
||||
},
|
||||
{ "country_id": "99", "sortname": "HU", "country_name": "Hungary" },
|
||||
{ "country_id": "100", "sortname": "IS", "country_name": "Iceland" },
|
||||
{ "country_id": "101", "sortname": "IN", "country_name": "India" },
|
||||
{ "country_id": "102", "sortname": "ID", "country_name": "Indonesia" },
|
||||
{ "country_id": "103", "sortname": "IR", "country_name": "Iran" },
|
||||
{ "country_id": "104", "sortname": "IQ", "country_name": "Iraq" },
|
||||
{ "country_id": "105", "sortname": "IE", "country_name": "Ireland" },
|
||||
{ "country_id": "106", "sortname": "IL", "country_name": "Israel" },
|
||||
{ "country_id": "107", "sortname": "IT", "country_name": "Italy" },
|
||||
{ "country_id": "108", "sortname": "JM", "country_name": "Jamaica" },
|
||||
{ "country_id": "109", "sortname": "JP", "country_name": "Japan" },
|
||||
{ "country_id": "110", "sortname": "XJ", "country_name": "Jersey" },
|
||||
{ "country_id": "111", "sortname": "JO", "country_name": "Jordan" },
|
||||
{ "country_id": "112", "sortname": "KZ", "country_name": "Kazakhstan" },
|
||||
{ "country_id": "113", "sortname": "KE", "country_name": "Kenya" },
|
||||
{ "country_id": "114", "sortname": "KI", "country_name": "Kiribati" },
|
||||
{ "country_id": "115", "sortname": "KP", "country_name": "North Korea" },
|
||||
{ "country_id": "116", "sortname": "KR", "country_name": "South Korea" },
|
||||
{ "country_id": "117", "sortname": "KW", "country_name": "Kuwait" },
|
||||
{ "country_id": "118", "sortname": "KG", "country_name": "Kyrgyzstan" },
|
||||
{ "country_id": "119", "sortname": "LA", "country_name": "Laos" },
|
||||
{ "country_id": "120", "sortname": "LV", "country_name": "Latvia" },
|
||||
{ "country_id": "121", "sortname": "LB", "country_name": "Lebanon" },
|
||||
{ "country_id": "122", "sortname": "LS", "country_name": "Lesotho" },
|
||||
{ "country_id": "123", "sortname": "LR", "country_name": "Liberia" },
|
||||
{ "country_id": "124", "sortname": "LY", "country_name": "Libya" },
|
||||
{ "country_id": "125", "sortname": "LI", "country_name": "Liechtenstein" },
|
||||
{ "country_id": "126", "sortname": "LT", "country_name": "Lithuania" },
|
||||
{ "country_id": "127", "sortname": "LU", "country_name": "Luxembourg" },
|
||||
{ "country_id": "128", "sortname": "MO", "country_name": "Macau" },
|
||||
{ "country_id": "129", "sortname": "MK", "country_name": "Macedonia" },
|
||||
{ "country_id": "130", "sortname": "MG", "country_name": "Madagascar" },
|
||||
{ "country_id": "131", "sortname": "MW", "country_name": "Malawi" },
|
||||
{ "country_id": "132", "sortname": "MY", "country_name": "Malaysia" },
|
||||
{ "country_id": "133", "sortname": "MV", "country_name": "Maldives" },
|
||||
{ "country_id": "134", "sortname": "ML", "country_name": "Mali" },
|
||||
{ "country_id": "135", "sortname": "MT", "country_name": "Malta" },
|
||||
{ "country_id": "136", "sortname": "XM", "country_name": "Isle of Man" },
|
||||
{
|
||||
"country_id": "137",
|
||||
"sortname": "MH",
|
||||
"country_name": "Marshall Islands"
|
||||
},
|
||||
{ "country_id": "138", "sortname": "MQ", "country_name": "Martinique" },
|
||||
{ "country_id": "139", "sortname": "MR", "country_name": "Mauritania" },
|
||||
{ "country_id": "140", "sortname": "MU", "country_name": "Mauritius" },
|
||||
{ "country_id": "141", "sortname": "YT", "country_name": "Mayotte" },
|
||||
{ "country_id": "142", "sortname": "MX", "country_name": "Mexico" },
|
||||
{ "country_id": "143", "sortname": "FM", "country_name": "Micronesia" },
|
||||
{ "country_id": "144", "sortname": "MD", "country_name": "Moldova" },
|
||||
{ "country_id": "145", "sortname": "MC", "country_name": "Monaco" },
|
||||
{ "country_id": "146", "sortname": "MN", "country_name": "Mongolia" },
|
||||
{ "country_id": "147", "sortname": "MS", "country_name": "Montserrat" },
|
||||
{ "country_id": "148", "sortname": "MA", "country_name": "Morocco" },
|
||||
{ "country_id": "149", "sortname": "MZ", "country_name": "Mozambique" },
|
||||
{ "country_id": "150", "sortname": "MM", "country_name": "Myanmar" },
|
||||
{ "country_id": "151", "sortname": "NA", "country_name": "Namibia" },
|
||||
{ "country_id": "152", "sortname": "NR", "country_name": "Nauru" },
|
||||
{ "country_id": "153", "sortname": "NP", "country_name": "Nepal" },
|
||||
{
|
||||
"country_id": "154",
|
||||
"sortname": "AN",
|
||||
"country_name": "Netherlands Antilles"
|
||||
},
|
||||
{
|
||||
"country_id": "155",
|
||||
"sortname": "NL",
|
||||
"country_name": "Netherlands The"
|
||||
},
|
||||
{ "country_id": "156", "sortname": "NC", "country_name": "New Caledonia" },
|
||||
{ "country_id": "157", "sortname": "NZ", "country_name": "New Zealand" },
|
||||
{ "country_id": "158", "sortname": "NI", "country_name": "Nicaragua" },
|
||||
{ "country_id": "159", "sortname": "NE", "country_name": "Niger" },
|
||||
{ "country_id": "160", "sortname": "NG", "country_name": "Nigeria" },
|
||||
{ "country_id": "161", "sortname": "NU", "country_name": "Niue" },
|
||||
{ "country_id": "162", "sortname": "NF", "country_name": "Norfolk Island" },
|
||||
{
|
||||
"country_id": "163",
|
||||
"sortname": "MP",
|
||||
"country_name": "Northern Mariana Islands"
|
||||
},
|
||||
{ "country_id": "164", "sortname": "NO", "country_name": "Norway" },
|
||||
{ "country_id": "165", "sortname": "OM", "country_name": "Oman" },
|
||||
{ "country_id": "166", "sortname": "PK", "country_name": "Pakistan" },
|
||||
{ "country_id": "167", "sortname": "PW", "country_name": "Palau" },
|
||||
{
|
||||
"country_id": "168",
|
||||
"sortname": "PS",
|
||||
"country_name": "Palestinian Territory Occupied"
|
||||
},
|
||||
{ "country_id": "169", "sortname": "PA", "country_name": "Panama" },
|
||||
{
|
||||
"country_id": "170",
|
||||
"sortname": "PG",
|
||||
"country_name": "Papua new Guinea"
|
||||
},
|
||||
{ "country_id": "171", "sortname": "PY", "country_name": "Paraguay" },
|
||||
{ "country_id": "172", "sortname": "PE", "country_name": "Peru" },
|
||||
{ "country_id": "173", "sortname": "PH", "country_name": "Philippines" },
|
||||
{
|
||||
"country_id": "174",
|
||||
"sortname": "PN",
|
||||
"country_name": "Pitcairn Island"
|
||||
},
|
||||
{ "country_id": "175", "sortname": "PL", "country_name": "Poland" },
|
||||
{ "country_id": "176", "sortname": "PT", "country_name": "Portugal" },
|
||||
{ "country_id": "177", "sortname": "PR", "country_name": "Puerto Rico" },
|
||||
{ "country_id": "178", "sortname": "QA", "country_name": "Qatar" },
|
||||
{ "country_id": "179", "sortname": "RE", "country_name": "Reunion" },
|
||||
{ "country_id": "180", "sortname": "RO", "country_name": "Romania" },
|
||||
{ "country_id": "181", "sortname": "RU", "country_name": "Russia" },
|
||||
{ "country_id": "182", "sortname": "RW", "country_name": "Rwanda" },
|
||||
{ "country_id": "183", "sortname": "SH", "country_name": "Saint Helena" },
|
||||
{
|
||||
"country_id": "184",
|
||||
"sortname": "KN",
|
||||
"country_name": "Saint Kitts And Nevis"
|
||||
},
|
||||
{ "country_id": "185", "sortname": "LC", "country_name": "Saint Lucia" },
|
||||
{
|
||||
"country_id": "186",
|
||||
"sortname": "PM",
|
||||
"country_name": "Saint Pierre and Miquelon"
|
||||
},
|
||||
{
|
||||
"country_id": "187",
|
||||
"sortname": "VC",
|
||||
"country_name": "Saint Vincent and The Grenadines"
|
||||
},
|
||||
{ "country_id": "188", "sortname": "WS", "country_name": "Samoa" },
|
||||
{ "country_id": "189", "sortname": "SM", "country_name": "San Marino" },
|
||||
{
|
||||
"country_id": "190",
|
||||
"sortname": "ST",
|
||||
"country_name": "Sao Tome and Principe"
|
||||
},
|
||||
{ "country_id": "191", "sortname": "SA", "country_name": "Saudi Arabia" },
|
||||
{ "country_id": "192", "sortname": "SN", "country_name": "Senegal" },
|
||||
{ "country_id": "193", "sortname": "RS", "country_name": "Serbia" },
|
||||
{ "country_id": "194", "sortname": "SC", "country_name": "Seychelles" },
|
||||
{ "country_id": "195", "sortname": "SL", "country_name": "Sierra Leone" },
|
||||
{ "country_id": "196", "sortname": "SG", "country_name": "Singapore" },
|
||||
{ "country_id": "197", "sortname": "SK", "country_name": "Slovakia" },
|
||||
{ "country_id": "198", "sortname": "SI", "country_name": "Slovenia" },
|
||||
{
|
||||
"country_id": "199",
|
||||
"sortname": "XG",
|
||||
"country_name": "Smaller Territories of the UK"
|
||||
},
|
||||
{
|
||||
"country_id": "200",
|
||||
"sortname": "SB",
|
||||
"country_name": "Solomon Islands"
|
||||
},
|
||||
{ "country_id": "201", "sortname": "SO", "country_name": "Somalia" },
|
||||
{ "country_id": "202", "sortname": "ZA", "country_name": "South Africa" },
|
||||
{ "country_id": "203", "sortname": "GS", "country_name": "South Georgia" },
|
||||
{ "country_id": "204", "sortname": "SS", "country_name": "South Sudan" },
|
||||
{ "country_id": "205", "sortname": "ES", "country_name": "Spain" },
|
||||
{ "country_id": "206", "sortname": "LK", "country_name": "Sri Lanka" },
|
||||
{ "country_id": "207", "sortname": "SD", "country_name": "Sudan" },
|
||||
{ "country_id": "208", "sortname": "SR", "country_name": "Suriname" },
|
||||
{
|
||||
"country_id": "209",
|
||||
"sortname": "SJ",
|
||||
"country_name": "Svalbard And Jan Mayen Islands"
|
||||
},
|
||||
{ "country_id": "210", "sortname": "SZ", "country_name": "Swaziland" },
|
||||
{ "country_id": "211", "sortname": "SE", "country_name": "Sweden" },
|
||||
{ "country_id": "212", "sortname": "CH", "country_name": "Switzerland" },
|
||||
{ "country_id": "213", "sortname": "SY", "country_name": "Syria" },
|
||||
{ "country_id": "214", "sortname": "TW", "country_name": "Taiwan" },
|
||||
{ "country_id": "215", "sortname": "TJ", "country_name": "Tajikistan" },
|
||||
{ "country_id": "216", "sortname": "TZ", "country_name": "Tanzania" },
|
||||
{ "country_id": "217", "sortname": "TH", "country_name": "Thailand" },
|
||||
{ "country_id": "218", "sortname": "TG", "country_name": "Togo" },
|
||||
{ "country_id": "219", "sortname": "TK", "country_name": "Tokelau" },
|
||||
{ "country_id": "220", "sortname": "TO", "country_name": "Tonga" },
|
||||
{
|
||||
"country_id": "221",
|
||||
"sortname": "TT",
|
||||
"country_name": "Trinidad And Tobago"
|
||||
},
|
||||
{ "country_id": "222", "sortname": "TN", "country_name": "Tunisia" },
|
||||
{ "country_id": "223", "sortname": "TR", "country_name": "Turkey" },
|
||||
{ "country_id": "224", "sortname": "TM", "country_name": "Turkmenistan" },
|
||||
{
|
||||
"country_id": "225",
|
||||
"sortname": "TC",
|
||||
"country_name": "Turks And Caicos Islands"
|
||||
},
|
||||
{ "country_id": "226", "sortname": "TV", "country_name": "Tuvalu" },
|
||||
{ "country_id": "227", "sortname": "UG", "country_name": "Uganda" },
|
||||
{ "country_id": "228", "sortname": "UA", "country_name": "Ukraine" },
|
||||
{
|
||||
"country_id": "229",
|
||||
"sortname": "AE",
|
||||
"country_name": "United Arab Emirates"
|
||||
},
|
||||
{ "country_id": "230", "sortname": "GB", "country_name": "United Kingdom" },
|
||||
{ "country_id": "231", "sortname": "US", "country_name": "United States" },
|
||||
{
|
||||
"country_id": "232",
|
||||
"sortname": "UM",
|
||||
"country_name": "United States Minor Outlying Islands"
|
||||
},
|
||||
{ "country_id": "233", "sortname": "UY", "country_name": "Uruguay" },
|
||||
{ "country_id": "234", "sortname": "UZ", "country_name": "Uzbekistan" },
|
||||
{ "country_id": "235", "sortname": "VU", "country_name": "Vanuatu" },
|
||||
{
|
||||
"country_id": "236",
|
||||
"sortname": "VA",
|
||||
"country_name": "Vatican City State (Holy See)"
|
||||
},
|
||||
{ "country_id": "237", "sortname": "VE", "country_name": "Venezuela" },
|
||||
{ "country_id": "238", "sortname": "VN", "country_name": "Vietnam" },
|
||||
{
|
||||
"country_id": "239",
|
||||
"sortname": "VG",
|
||||
"country_name": "Virgin Islands (British)"
|
||||
},
|
||||
{
|
||||
"country_id": "240",
|
||||
"sortname": "VI",
|
||||
"country_name": "Virgin Islands (US)"
|
||||
},
|
||||
{
|
||||
"country_id": "241",
|
||||
"sortname": "WF",
|
||||
"country_name": "Wallis And Futuna Islands"
|
||||
},
|
||||
{ "country_id": "242", "sortname": "EH", "country_name": "Western Sahara" },
|
||||
{ "country_id": "243", "sortname": "YE", "country_name": "Yemen" },
|
||||
{ "country_id": "244", "sortname": "YU", "country_name": "Yugoslavia" },
|
||||
{ "country_id": "245", "sortname": "ZM", "country_name": "Zambia" },
|
||||
{ "country_id": "246", "sortname": "ZW", "country_name": "Zimbabwe" }
|
||||
]
|
||||
}
|
|
@ -0,0 +1,73 @@
|
|||
-- CreateTable
|
||||
CREATE TABLE "Example" (
|
||||
"id" TEXT NOT NULL,
|
||||
|
||||
CONSTRAINT "Example_pkey" PRIMARY KEY ("id")
|
||||
);
|
||||
|
||||
-- CreateTable
|
||||
CREATE TABLE "Account" (
|
||||
"id" TEXT NOT NULL,
|
||||
"userId" TEXT NOT NULL,
|
||||
"type" TEXT NOT NULL,
|
||||
"provider" TEXT NOT NULL,
|
||||
"providerAccountId" TEXT NOT NULL,
|
||||
"refresh_token" TEXT,
|
||||
"access_token" TEXT,
|
||||
"expires_at" INTEGER,
|
||||
"token_type" TEXT,
|
||||
"scope" TEXT,
|
||||
"id_token" TEXT,
|
||||
"session_state" TEXT,
|
||||
|
||||
CONSTRAINT "Account_pkey" PRIMARY KEY ("id")
|
||||
);
|
||||
|
||||
-- CreateTable
|
||||
CREATE TABLE "Session" (
|
||||
"id" TEXT NOT NULL,
|
||||
"sessionToken" TEXT NOT NULL,
|
||||
"userId" TEXT NOT NULL,
|
||||
"expires" TIMESTAMP(3) NOT NULL,
|
||||
|
||||
CONSTRAINT "Session_pkey" PRIMARY KEY ("id")
|
||||
);
|
||||
|
||||
-- CreateTable
|
||||
CREATE TABLE "User" (
|
||||
"id" TEXT NOT NULL,
|
||||
"name" TEXT,
|
||||
"email" TEXT,
|
||||
"emailVerified" TIMESTAMP(3),
|
||||
"image" TEXT,
|
||||
|
||||
CONSTRAINT "User_pkey" PRIMARY KEY ("id")
|
||||
);
|
||||
|
||||
-- CreateTable
|
||||
CREATE TABLE "VerificationToken" (
|
||||
"identifier" TEXT NOT NULL,
|
||||
"token" TEXT NOT NULL,
|
||||
"expires" TIMESTAMP(3) NOT NULL
|
||||
);
|
||||
|
||||
-- CreateIndex
|
||||
CREATE UNIQUE INDEX "Account_provider_providerAccountId_key" ON "Account"("provider", "providerAccountId");
|
||||
|
||||
-- CreateIndex
|
||||
CREATE UNIQUE INDEX "Session_sessionToken_key" ON "Session"("sessionToken");
|
||||
|
||||
-- CreateIndex
|
||||
CREATE UNIQUE INDEX "User_email_key" ON "User"("email");
|
||||
|
||||
-- CreateIndex
|
||||
CREATE UNIQUE INDEX "VerificationToken_token_key" ON "VerificationToken"("token");
|
||||
|
||||
-- CreateIndex
|
||||
CREATE UNIQUE INDEX "VerificationToken_identifier_token_key" ON "VerificationToken"("identifier", "token");
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE "Account" ADD CONSTRAINT "Account_userId_fkey" FOREIGN KEY ("userId") REFERENCES "User"("id") ON DELETE CASCADE ON UPDATE CASCADE;
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE "Session" ADD CONSTRAINT "Session_userId_fkey" FOREIGN KEY ("userId") REFERENCES "User"("id") ON DELETE CASCADE ON UPDATE CASCADE;
|
|
@ -0,0 +1,26 @@
|
|||
/*
|
||||
Warnings:
|
||||
|
||||
- You are about to drop the `Example` table. If the table is not empty, all the data it contains will be lost.
|
||||
|
||||
*/
|
||||
-- CreateEnum
|
||||
CREATE TYPE "TodoStatus" AS ENUM ('INCOMPLETE', 'COMPLETE');
|
||||
|
||||
-- DropTable
|
||||
DROP TABLE "Example";
|
||||
|
||||
-- CreateTable
|
||||
CREATE TABLE "Todo" (
|
||||
"id" TEXT NOT NULL,
|
||||
"userId" TEXT NOT NULL,
|
||||
"text" TEXT NOT NULL,
|
||||
"status" "TodoStatus" NOT NULL DEFAULT 'INCOMPLETE',
|
||||
"createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
"updatedAt" TIMESTAMP(3) NOT NULL,
|
||||
|
||||
CONSTRAINT "Todo_pkey" PRIMARY KEY ("id")
|
||||
);
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE "Todo" ADD CONSTRAINT "Todo_userId_fkey" FOREIGN KEY ("userId") REFERENCES "User"("id") ON DELETE CASCADE ON UPDATE CASCADE;
|
|
@ -0,0 +1,15 @@
|
|||
-- CreateTable
|
||||
CREATE TABLE "Company" (
|
||||
"id" TEXT NOT NULL,
|
||||
"name" TEXT NOT NULL,
|
||||
"slug" TEXT NOT NULL,
|
||||
"description" TEXT,
|
||||
"logoUrl" TEXT,
|
||||
"createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
"updatedAt" TIMESTAMP(3) NOT NULL,
|
||||
|
||||
CONSTRAINT "Company_pkey" PRIMARY KEY ("id")
|
||||
);
|
||||
|
||||
-- CreateIndex
|
||||
CREATE UNIQUE INDEX "Company_slug_key" ON "Company"("slug");
|
|
@ -0,0 +1,74 @@
|
|||
-- CreateEnum
|
||||
CREATE TYPE "ResumesSection" AS ENUM ('GENERAL', 'EDUCATION', 'EXPERIENCE', 'PROJECTS', 'SKILLS');
|
||||
|
||||
-- CreateTable
|
||||
CREATE TABLE "ResumesResume" (
|
||||
"id" TEXT NOT NULL,
|
||||
"userId" TEXT NOT NULL,
|
||||
"title" TEXT NOT NULL,
|
||||
"role" TEXT NOT NULL,
|
||||
"experience" TEXT NOT NULL,
|
||||
"location" TEXT NOT NULL,
|
||||
"url" TEXT NOT NULL,
|
||||
"additionalInfo" TEXT,
|
||||
"createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
"updatedAt" TIMESTAMP(3) NOT NULL,
|
||||
|
||||
CONSTRAINT "ResumesResume_pkey" PRIMARY KEY ("id")
|
||||
);
|
||||
|
||||
-- CreateTable
|
||||
CREATE TABLE "ResumesStar" (
|
||||
"id" TEXT NOT NULL,
|
||||
"resumeId" TEXT NOT NULL,
|
||||
"userId" TEXT NOT NULL,
|
||||
"createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
|
||||
CONSTRAINT "ResumesStar_pkey" PRIMARY KEY ("id")
|
||||
);
|
||||
|
||||
-- CreateTable
|
||||
CREATE TABLE "ResumesComment" (
|
||||
"id" TEXT NOT NULL,
|
||||
"resumeId" TEXT NOT NULL,
|
||||
"userId" TEXT NOT NULL,
|
||||
"description" TEXT NOT NULL,
|
||||
"section" "ResumesSection" NOT NULL,
|
||||
"createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
"updatedAt" TIMESTAMP(3) NOT NULL,
|
||||
|
||||
CONSTRAINT "ResumesComment_pkey" PRIMARY KEY ("id")
|
||||
);
|
||||
|
||||
-- CreateTable
|
||||
CREATE TABLE "ResumesCommentVote" (
|
||||
"id" TEXT NOT NULL,
|
||||
"commentId" TEXT NOT NULL,
|
||||
"userId" TEXT NOT NULL,
|
||||
"value" INTEGER NOT NULL,
|
||||
"createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
"updatedAt" TIMESTAMP(3) NOT NULL,
|
||||
|
||||
CONSTRAINT "ResumesCommentVote_pkey" PRIMARY KEY ("id")
|
||||
);
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE "ResumesResume" ADD CONSTRAINT "ResumesResume_userId_fkey" FOREIGN KEY ("userId") REFERENCES "User"("id") ON DELETE CASCADE ON UPDATE CASCADE;
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE "ResumesStar" ADD CONSTRAINT "ResumesStar_userId_fkey" FOREIGN KEY ("userId") REFERENCES "User"("id") ON DELETE CASCADE ON UPDATE CASCADE;
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE "ResumesStar" ADD CONSTRAINT "ResumesStar_resumeId_fkey" FOREIGN KEY ("resumeId") REFERENCES "ResumesResume"("id") ON DELETE CASCADE ON UPDATE CASCADE;
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE "ResumesComment" ADD CONSTRAINT "ResumesComment_userId_fkey" FOREIGN KEY ("userId") REFERENCES "User"("id") ON DELETE CASCADE ON UPDATE CASCADE;
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE "ResumesComment" ADD CONSTRAINT "ResumesComment_resumeId_fkey" FOREIGN KEY ("resumeId") REFERENCES "ResumesResume"("id") ON DELETE CASCADE ON UPDATE CASCADE;
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE "ResumesCommentVote" ADD CONSTRAINT "ResumesCommentVote_userId_fkey" FOREIGN KEY ("userId") REFERENCES "User"("id") ON DELETE CASCADE ON UPDATE CASCADE;
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE "ResumesCommentVote" ADD CONSTRAINT "ResumesCommentVote_commentId_fkey" FOREIGN KEY ("commentId") REFERENCES "ResumesComment"("id") ON DELETE CASCADE ON UPDATE CASCADE;
|
|
@ -0,0 +1,74 @@
|
|||
/*
|
||||
Warnings:
|
||||
|
||||
- You are about to drop the column `userId` on the `ResumesComment` table. All the data in the column will be lost.
|
||||
- You are about to drop the column `userId` on the `ResumesCommentVote` table. All the data in the column will be lost.
|
||||
- You are about to drop the column `userId` on the `ResumesResume` table. All the data in the column will be lost.
|
||||
- You are about to drop the column `userId` on the `ResumesStar` table. All the data in the column will be lost.
|
||||
- A unique constraint covering the columns `[commentId,resumesProfileId]` on the table `ResumesCommentVote` will be added. If there are existing duplicate values, this will fail.
|
||||
- A unique constraint covering the columns `[resumeId,resumesProfileId]` on the table `ResumesStar` will be added. If there are existing duplicate values, this will fail.
|
||||
- Added the required column `resumesProfileId` to the `ResumesComment` table without a default value. This is not possible if the table is not empty.
|
||||
- Added the required column `resumesProfileId` to the `ResumesCommentVote` table without a default value. This is not possible if the table is not empty.
|
||||
- Added the required column `resumesProfileId` to the `ResumesResume` table without a default value. This is not possible if the table is not empty.
|
||||
- Added the required column `resumesProfileId` to the `ResumesStar` table without a default value. This is not possible if the table is not empty.
|
||||
|
||||
*/
|
||||
-- DropForeignKey
|
||||
ALTER TABLE "ResumesComment" DROP CONSTRAINT "ResumesComment_userId_fkey";
|
||||
|
||||
-- DropForeignKey
|
||||
ALTER TABLE "ResumesCommentVote" DROP CONSTRAINT "ResumesCommentVote_userId_fkey";
|
||||
|
||||
-- DropForeignKey
|
||||
ALTER TABLE "ResumesResume" DROP CONSTRAINT "ResumesResume_userId_fkey";
|
||||
|
||||
-- DropForeignKey
|
||||
ALTER TABLE "ResumesStar" DROP CONSTRAINT "ResumesStar_userId_fkey";
|
||||
|
||||
-- AlterTable
|
||||
ALTER TABLE "ResumesComment" DROP COLUMN "userId",
|
||||
ADD COLUMN "resumesProfileId" TEXT NOT NULL;
|
||||
|
||||
-- AlterTable
|
||||
ALTER TABLE "ResumesCommentVote" DROP COLUMN "userId",
|
||||
ADD COLUMN "resumesProfileId" TEXT NOT NULL;
|
||||
|
||||
-- AlterTable
|
||||
ALTER TABLE "ResumesResume" DROP COLUMN "userId",
|
||||
ADD COLUMN "resumesProfileId" TEXT NOT NULL;
|
||||
|
||||
-- AlterTable
|
||||
ALTER TABLE "ResumesStar" DROP COLUMN "userId",
|
||||
ADD COLUMN "resumesProfileId" TEXT NOT NULL;
|
||||
|
||||
-- CreateTable
|
||||
CREATE TABLE "ResumesProfile" (
|
||||
"id" TEXT NOT NULL,
|
||||
"userId" TEXT NOT NULL,
|
||||
|
||||
CONSTRAINT "ResumesProfile_pkey" PRIMARY KEY ("id")
|
||||
);
|
||||
|
||||
-- CreateIndex
|
||||
CREATE UNIQUE INDEX "ResumesProfile_userId_key" ON "ResumesProfile"("userId");
|
||||
|
||||
-- CreateIndex
|
||||
CREATE UNIQUE INDEX "ResumesCommentVote_commentId_resumesProfileId_key" ON "ResumesCommentVote"("commentId", "resumesProfileId");
|
||||
|
||||
-- CreateIndex
|
||||
CREATE UNIQUE INDEX "ResumesStar_resumeId_resumesProfileId_key" ON "ResumesStar"("resumeId", "resumesProfileId");
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE "ResumesProfile" ADD CONSTRAINT "ResumesProfile_userId_fkey" FOREIGN KEY ("userId") REFERENCES "User"("id") ON DELETE CASCADE ON UPDATE CASCADE;
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE "ResumesResume" ADD CONSTRAINT "ResumesResume_resumesProfileId_fkey" FOREIGN KEY ("resumesProfileId") REFERENCES "ResumesProfile"("id") ON DELETE CASCADE ON UPDATE CASCADE;
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE "ResumesStar" ADD CONSTRAINT "ResumesStar_resumesProfileId_fkey" FOREIGN KEY ("resumesProfileId") REFERENCES "ResumesProfile"("id") ON DELETE CASCADE ON UPDATE CASCADE;
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE "ResumesComment" ADD CONSTRAINT "ResumesComment_resumesProfileId_fkey" FOREIGN KEY ("resumesProfileId") REFERENCES "ResumesProfile"("id") ON DELETE CASCADE ON UPDATE CASCADE;
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE "ResumesCommentVote" ADD CONSTRAINT "ResumesCommentVote_resumesProfileId_fkey" FOREIGN KEY ("resumesProfileId") REFERENCES "ResumesProfile"("id") ON DELETE CASCADE ON UPDATE CASCADE;
|
|
@ -0,0 +1,171 @@
|
|||
-- CreateEnum
|
||||
CREATE TYPE "QuestionsVote" AS ENUM ('NO_VOTE', 'UPVOTE', 'DOWNVOTE');
|
||||
|
||||
-- CreateTable
|
||||
CREATE TABLE "QuestionsQuestion" (
|
||||
"id" TEXT NOT NULL,
|
||||
"userId" TEXT,
|
||||
"content" TEXT NOT NULL,
|
||||
"createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
"updatedAt" TIMESTAMP(3) NOT NULL,
|
||||
|
||||
CONSTRAINT "QuestionsQuestion_pkey" PRIMARY KEY ("id")
|
||||
);
|
||||
|
||||
-- CreateTable
|
||||
CREATE TABLE "QuestionsQuestionEncounter" (
|
||||
"id" TEXT NOT NULL,
|
||||
"questionId" TEXT NOT NULL,
|
||||
"userId" TEXT,
|
||||
"createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
"updatedAt" TIMESTAMP(3) NOT NULL,
|
||||
|
||||
CONSTRAINT "QuestionsQuestionEncounter_pkey" PRIMARY KEY ("id")
|
||||
);
|
||||
|
||||
-- CreateTable
|
||||
CREATE TABLE "QuestionsQuestionVote" (
|
||||
"id" TEXT NOT NULL,
|
||||
"questionId" TEXT NOT NULL,
|
||||
"userId" TEXT,
|
||||
"vote" "QuestionsVote" NOT NULL,
|
||||
"createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
"updatedAt" TIMESTAMP(3) NOT NULL,
|
||||
|
||||
CONSTRAINT "QuestionsQuestionVote_pkey" PRIMARY KEY ("id")
|
||||
);
|
||||
|
||||
-- CreateTable
|
||||
CREATE TABLE "QuestionsQuestionComment" (
|
||||
"id" TEXT NOT NULL,
|
||||
"questionId" TEXT NOT NULL,
|
||||
"userId" TEXT,
|
||||
"content" TEXT NOT NULL,
|
||||
"createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
"updatedAt" TIMESTAMP(3) NOT NULL,
|
||||
|
||||
CONSTRAINT "QuestionsQuestionComment_pkey" PRIMARY KEY ("id")
|
||||
);
|
||||
|
||||
-- CreateTable
|
||||
CREATE TABLE "QuestionsQuestionCommentVote" (
|
||||
"id" TEXT NOT NULL,
|
||||
"questionCommentId" TEXT NOT NULL,
|
||||
"userId" TEXT,
|
||||
"vote" "QuestionsVote" NOT NULL,
|
||||
"createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
"updatedAt" TIMESTAMP(3) NOT NULL,
|
||||
|
||||
CONSTRAINT "QuestionsQuestionCommentVote_pkey" PRIMARY KEY ("id")
|
||||
);
|
||||
|
||||
-- CreateTable
|
||||
CREATE TABLE "QuestionsAnswer" (
|
||||
"id" TEXT NOT NULL,
|
||||
"questionId" TEXT NOT NULL,
|
||||
"userId" TEXT,
|
||||
"content" TEXT NOT NULL,
|
||||
"createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
"updatedAt" TIMESTAMP(3) NOT NULL,
|
||||
|
||||
CONSTRAINT "QuestionsAnswer_pkey" PRIMARY KEY ("id")
|
||||
);
|
||||
|
||||
-- CreateTable
|
||||
CREATE TABLE "QuestionsAnswerVote" (
|
||||
"id" TEXT NOT NULL,
|
||||
"answerId" TEXT NOT NULL,
|
||||
"userId" TEXT,
|
||||
"vote" "QuestionsVote" NOT NULL,
|
||||
"createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
"updatedAt" TIMESTAMP(3) NOT NULL,
|
||||
|
||||
CONSTRAINT "QuestionsAnswerVote_pkey" PRIMARY KEY ("id")
|
||||
);
|
||||
|
||||
-- CreateTable
|
||||
CREATE TABLE "QuestionsAnswerComment" (
|
||||
"id" TEXT NOT NULL,
|
||||
"answerId" TEXT NOT NULL,
|
||||
"userId" TEXT,
|
||||
"content" TEXT NOT NULL,
|
||||
"createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
"updatedAt" TIMESTAMP(3) NOT NULL,
|
||||
|
||||
CONSTRAINT "QuestionsAnswerComment_pkey" PRIMARY KEY ("id")
|
||||
);
|
||||
|
||||
-- CreateTable
|
||||
CREATE TABLE "QuestionsAnswerCommentVote" (
|
||||
"id" TEXT NOT NULL,
|
||||
"answerCommentId" TEXT NOT NULL,
|
||||
"userId" TEXT,
|
||||
"vote" "QuestionsVote" NOT NULL,
|
||||
"createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
"updatedAt" TIMESTAMP(3) NOT NULL,
|
||||
|
||||
CONSTRAINT "QuestionsAnswerCommentVote_pkey" PRIMARY KEY ("id")
|
||||
);
|
||||
|
||||
-- CreateIndex
|
||||
CREATE UNIQUE INDEX "QuestionsQuestionVote_questionId_userId_key" ON "QuestionsQuestionVote"("questionId", "userId");
|
||||
|
||||
-- CreateIndex
|
||||
CREATE UNIQUE INDEX "QuestionsQuestionCommentVote_questionCommentId_userId_key" ON "QuestionsQuestionCommentVote"("questionCommentId", "userId");
|
||||
|
||||
-- CreateIndex
|
||||
CREATE UNIQUE INDEX "QuestionsAnswerVote_answerId_userId_key" ON "QuestionsAnswerVote"("answerId", "userId");
|
||||
|
||||
-- CreateIndex
|
||||
CREATE UNIQUE INDEX "QuestionsAnswerCommentVote_answerCommentId_userId_key" ON "QuestionsAnswerCommentVote"("answerCommentId", "userId");
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE "QuestionsQuestion" ADD CONSTRAINT "QuestionsQuestion_userId_fkey" FOREIGN KEY ("userId") REFERENCES "User"("id") ON DELETE SET NULL ON UPDATE CASCADE;
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE "QuestionsQuestionEncounter" ADD CONSTRAINT "QuestionsQuestionEncounter_userId_fkey" FOREIGN KEY ("userId") REFERENCES "User"("id") ON DELETE SET NULL ON UPDATE CASCADE;
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE "QuestionsQuestionEncounter" ADD CONSTRAINT "QuestionsQuestionEncounter_questionId_fkey" FOREIGN KEY ("questionId") REFERENCES "QuestionsQuestion"("id") ON DELETE CASCADE ON UPDATE CASCADE;
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE "QuestionsQuestionVote" ADD CONSTRAINT "QuestionsQuestionVote_userId_fkey" FOREIGN KEY ("userId") REFERENCES "User"("id") ON DELETE SET NULL ON UPDATE CASCADE;
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE "QuestionsQuestionVote" ADD CONSTRAINT "QuestionsQuestionVote_questionId_fkey" FOREIGN KEY ("questionId") REFERENCES "QuestionsQuestion"("id") ON DELETE CASCADE ON UPDATE CASCADE;
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE "QuestionsQuestionComment" ADD CONSTRAINT "QuestionsQuestionComment_userId_fkey" FOREIGN KEY ("userId") REFERENCES "User"("id") ON DELETE SET NULL ON UPDATE CASCADE;
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE "QuestionsQuestionComment" ADD CONSTRAINT "QuestionsQuestionComment_questionId_fkey" FOREIGN KEY ("questionId") REFERENCES "QuestionsQuestion"("id") ON DELETE CASCADE ON UPDATE CASCADE;
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE "QuestionsQuestionCommentVote" ADD CONSTRAINT "QuestionsQuestionCommentVote_userId_fkey" FOREIGN KEY ("userId") REFERENCES "User"("id") ON DELETE SET NULL ON UPDATE CASCADE;
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE "QuestionsQuestionCommentVote" ADD CONSTRAINT "QuestionsQuestionCommentVote_questionCommentId_fkey" FOREIGN KEY ("questionCommentId") REFERENCES "QuestionsQuestionComment"("id") ON DELETE CASCADE ON UPDATE CASCADE;
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE "QuestionsAnswer" ADD CONSTRAINT "QuestionsAnswer_userId_fkey" FOREIGN KEY ("userId") REFERENCES "User"("id") ON DELETE SET NULL ON UPDATE CASCADE;
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE "QuestionsAnswer" ADD CONSTRAINT "QuestionsAnswer_questionId_fkey" FOREIGN KEY ("questionId") REFERENCES "QuestionsQuestion"("id") ON DELETE CASCADE ON UPDATE CASCADE;
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE "QuestionsAnswerVote" ADD CONSTRAINT "QuestionsAnswerVote_userId_fkey" FOREIGN KEY ("userId") REFERENCES "User"("id") ON DELETE SET NULL ON UPDATE CASCADE;
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE "QuestionsAnswerVote" ADD CONSTRAINT "QuestionsAnswerVote_answerId_fkey" FOREIGN KEY ("answerId") REFERENCES "QuestionsAnswer"("id") ON DELETE CASCADE ON UPDATE CASCADE;
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE "QuestionsAnswerComment" ADD CONSTRAINT "QuestionsAnswerComment_userId_fkey" FOREIGN KEY ("userId") REFERENCES "User"("id") ON DELETE SET NULL ON UPDATE CASCADE;
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE "QuestionsAnswerComment" ADD CONSTRAINT "QuestionsAnswerComment_answerId_fkey" FOREIGN KEY ("answerId") REFERENCES "QuestionsAnswer"("id") ON DELETE CASCADE ON UPDATE CASCADE;
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE "QuestionsAnswerCommentVote" ADD CONSTRAINT "QuestionsAnswerCommentVote_userId_fkey" FOREIGN KEY ("userId") REFERENCES "User"("id") ON DELETE SET NULL ON UPDATE CASCADE;
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE "QuestionsAnswerCommentVote" ADD CONSTRAINT "QuestionsAnswerCommentVote_answerCommentId_fkey" FOREIGN KEY ("answerCommentId") REFERENCES "QuestionsAnswerComment"("id") ON DELETE CASCADE ON UPDATE CASCADE;
|
|
@ -0,0 +1,73 @@
|
|||
/*
|
||||
Warnings:
|
||||
|
||||
- You are about to drop the column `resumesProfileId` on the `ResumesComment` table. All the data in the column will be lost.
|
||||
- You are about to drop the column `resumesProfileId` on the `ResumesCommentVote` table. All the data in the column will be lost.
|
||||
- You are about to drop the column `resumesProfileId` on the `ResumesResume` table. All the data in the column will be lost.
|
||||
- You are about to drop the column `resumesProfileId` on the `ResumesStar` table. All the data in the column will be lost.
|
||||
- You are about to drop the `ResumesProfile` table. If the table is not empty, all the data it contains will be lost.
|
||||
- A unique constraint covering the columns `[userId,commentId]` on the table `ResumesCommentVote` will be added. If there are existing duplicate values, this will fail.
|
||||
- A unique constraint covering the columns `[userId,resumeId]` on the table `ResumesStar` will be added. If there are existing duplicate values, this will fail.
|
||||
- Added the required column `userId` to the `ResumesComment` table without a default value. This is not possible if the table is not empty.
|
||||
- Added the required column `userId` to the `ResumesCommentVote` table without a default value. This is not possible if the table is not empty.
|
||||
- Added the required column `userId` to the `ResumesResume` table without a default value. This is not possible if the table is not empty.
|
||||
- Added the required column `userId` to the `ResumesStar` table without a default value. This is not possible if the table is not empty.
|
||||
|
||||
*/
|
||||
-- DropForeignKey
|
||||
ALTER TABLE "ResumesComment" DROP CONSTRAINT "ResumesComment_resumesProfileId_fkey";
|
||||
|
||||
-- DropForeignKey
|
||||
ALTER TABLE "ResumesCommentVote" DROP CONSTRAINT "ResumesCommentVote_resumesProfileId_fkey";
|
||||
|
||||
-- DropForeignKey
|
||||
ALTER TABLE "ResumesProfile" DROP CONSTRAINT "ResumesProfile_userId_fkey";
|
||||
|
||||
-- DropForeignKey
|
||||
ALTER TABLE "ResumesResume" DROP CONSTRAINT "ResumesResume_resumesProfileId_fkey";
|
||||
|
||||
-- DropForeignKey
|
||||
ALTER TABLE "ResumesStar" DROP CONSTRAINT "ResumesStar_resumesProfileId_fkey";
|
||||
|
||||
-- DropIndex
|
||||
DROP INDEX "ResumesCommentVote_commentId_resumesProfileId_key";
|
||||
|
||||
-- DropIndex
|
||||
DROP INDEX "ResumesStar_resumeId_resumesProfileId_key";
|
||||
|
||||
-- AlterTable
|
||||
ALTER TABLE "ResumesComment" DROP COLUMN "resumesProfileId",
|
||||
ADD COLUMN "userId" TEXT NOT NULL;
|
||||
|
||||
-- AlterTable
|
||||
ALTER TABLE "ResumesCommentVote" DROP COLUMN "resumesProfileId",
|
||||
ADD COLUMN "userId" TEXT NOT NULL;
|
||||
|
||||
-- AlterTable
|
||||
ALTER TABLE "ResumesResume" DROP COLUMN "resumesProfileId",
|
||||
ADD COLUMN "userId" TEXT NOT NULL;
|
||||
|
||||
-- AlterTable
|
||||
ALTER TABLE "ResumesStar" DROP COLUMN "resumesProfileId",
|
||||
ADD COLUMN "userId" TEXT NOT NULL;
|
||||
|
||||
-- DropTable
|
||||
DROP TABLE "ResumesProfile";
|
||||
|
||||
-- CreateIndex
|
||||
CREATE UNIQUE INDEX "ResumesCommentVote_userId_commentId_key" ON "ResumesCommentVote"("userId", "commentId");
|
||||
|
||||
-- CreateIndex
|
||||
CREATE UNIQUE INDEX "ResumesStar_userId_resumeId_key" ON "ResumesStar"("userId", "resumeId");
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE "ResumesResume" ADD CONSTRAINT "ResumesResume_userId_fkey" FOREIGN KEY ("userId") REFERENCES "User"("id") ON DELETE CASCADE ON UPDATE CASCADE;
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE "ResumesStar" ADD CONSTRAINT "ResumesStar_userId_fkey" FOREIGN KEY ("userId") REFERENCES "User"("id") ON DELETE CASCADE ON UPDATE CASCADE;
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE "ResumesComment" ADD CONSTRAINT "ResumesComment_userId_fkey" FOREIGN KEY ("userId") REFERENCES "User"("id") ON DELETE CASCADE ON UPDATE CASCADE;
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE "ResumesCommentVote" ADD CONSTRAINT "ResumesCommentVote_userId_fkey" FOREIGN KEY ("userId") REFERENCES "User"("id") ON DELETE CASCADE ON UPDATE CASCADE;
|
|
@ -0,0 +1,11 @@
|
|||
/*
|
||||
Warnings:
|
||||
|
||||
- Added the required column `questionType` to the `QuestionsQuestion` table without a default value. This is not possible if the table is not empty.
|
||||
|
||||
*/
|
||||
-- CreateEnum
|
||||
CREATE TYPE "QuestionsQuestionType" AS ENUM ('CODING', 'SYSTEM_DESIGN', 'BEHAVIORAL');
|
||||
|
||||
-- AlterTable
|
||||
ALTER TABLE "QuestionsQuestion" ADD COLUMN "questionType" "QuestionsQuestionType" NOT NULL;
|
|
@ -0,0 +1,12 @@
|
|||
/*
|
||||
Warnings:
|
||||
|
||||
- Added the required column `company` to the `QuestionsQuestionEncounter` table without a default value. This is not possible if the table is not empty.
|
||||
- Added the required column `location` to the `QuestionsQuestionEncounter` table without a default value. This is not possible if the table is not empty.
|
||||
- Added the required column `role` to the `QuestionsQuestionEncounter` table without a default value. This is not possible if the table is not empty.
|
||||
|
||||
*/
|
||||
-- AlterTable
|
||||
ALTER TABLE "QuestionsQuestionEncounter" ADD COLUMN "company" TEXT NOT NULL,
|
||||
ADD COLUMN "location" TEXT NOT NULL,
|
||||
ADD COLUMN "role" TEXT NOT NULL;
|
|
@ -0,0 +1,30 @@
|
|||
/*
|
||||
Warnings:
|
||||
|
||||
- Changed the type of `vote` on the `QuestionsAnswerCommentVote` table. No cast exists, the column would be dropped and recreated, which cannot be done if there is data, since the column is required.
|
||||
- Changed the type of `vote` on the `QuestionsAnswerVote` table. No cast exists, the column would be dropped and recreated, which cannot be done if there is data, since the column is required.
|
||||
- Changed the type of `vote` on the `QuestionsQuestionCommentVote` table. No cast exists, the column would be dropped and recreated, which cannot be done if there is data, since the column is required.
|
||||
- Changed the type of `vote` on the `QuestionsQuestionVote` table. No cast exists, the column would be dropped and recreated, which cannot be done if there is data, since the column is required.
|
||||
|
||||
*/
|
||||
-- CreateEnum
|
||||
CREATE TYPE "Vote" AS ENUM ('UPVOTE', 'DOWNVOTE');
|
||||
|
||||
-- AlterTable
|
||||
ALTER TABLE "QuestionsAnswerCommentVote" DROP COLUMN "vote",
|
||||
ADD COLUMN "vote" "Vote" NOT NULL;
|
||||
|
||||
-- AlterTable
|
||||
ALTER TABLE "QuestionsAnswerVote" DROP COLUMN "vote",
|
||||
ADD COLUMN "vote" "Vote" NOT NULL;
|
||||
|
||||
-- AlterTable
|
||||
ALTER TABLE "QuestionsQuestionCommentVote" DROP COLUMN "vote",
|
||||
ADD COLUMN "vote" "Vote" NOT NULL;
|
||||
|
||||
-- AlterTable
|
||||
ALTER TABLE "QuestionsQuestionVote" DROP COLUMN "vote",
|
||||
ADD COLUMN "vote" "Vote" NOT NULL;
|
||||
|
||||
-- DropEnum
|
||||
DROP TYPE "QuestionsVote";
|
|
@ -0,0 +1,8 @@
|
|||
/*
|
||||
Warnings:
|
||||
|
||||
- Added the required column `seenAt` to the `QuestionsQuestionEncounter` table without a default value. This is not possible if the table is not empty.
|
||||
|
||||
*/
|
||||
-- AlterTable
|
||||
ALTER TABLE "QuestionsQuestionEncounter" ADD COLUMN "seenAt" TIMESTAMP(3) NOT NULL;
|
|
@ -0,0 +1,204 @@
|
|||
-- CreateEnum
|
||||
CREATE TYPE "JobType" AS ENUM ('INTERN', 'FULLTIME');
|
||||
|
||||
-- CreateTable
|
||||
CREATE TABLE "OffersProfile" (
|
||||
"id" TEXT NOT NULL,
|
||||
"profileName" TEXT NOT NULL,
|
||||
"createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
"editToken" TEXT NOT NULL,
|
||||
"userId" TEXT,
|
||||
|
||||
CONSTRAINT "OffersProfile_pkey" PRIMARY KEY ("id")
|
||||
);
|
||||
|
||||
-- CreateTable
|
||||
CREATE TABLE "OffersBackground" (
|
||||
"id" TEXT NOT NULL,
|
||||
"totalYoe" INTEGER,
|
||||
"offersProfileId" TEXT NOT NULL,
|
||||
|
||||
CONSTRAINT "OffersBackground_pkey" PRIMARY KEY ("id")
|
||||
);
|
||||
|
||||
-- CreateTable
|
||||
CREATE TABLE "OffersSpecificYoe" (
|
||||
"id" TEXT NOT NULL,
|
||||
"yoe" INTEGER NOT NULL,
|
||||
"domain" TEXT NOT NULL,
|
||||
"backgroundId" TEXT NOT NULL,
|
||||
|
||||
CONSTRAINT "OffersSpecificYoe_pkey" PRIMARY KEY ("id")
|
||||
);
|
||||
|
||||
-- CreateTable
|
||||
CREATE TABLE "OffersExperience" (
|
||||
"id" TEXT NOT NULL,
|
||||
"companyId" TEXT,
|
||||
"jobType" "JobType",
|
||||
"title" TEXT,
|
||||
"durationInMonths" INTEGER,
|
||||
"specialization" TEXT,
|
||||
"level" TEXT,
|
||||
"totalCompensationId" TEXT,
|
||||
"monthlySalaryId" TEXT,
|
||||
"backgroundId" TEXT NOT NULL,
|
||||
|
||||
CONSTRAINT "OffersExperience_pkey" PRIMARY KEY ("id")
|
||||
);
|
||||
|
||||
-- CreateTable
|
||||
CREATE TABLE "OffersCurrency" (
|
||||
"id" TEXT NOT NULL,
|
||||
"value" INTEGER NOT NULL,
|
||||
"currency" TEXT NOT NULL,
|
||||
|
||||
CONSTRAINT "OffersCurrency_pkey" PRIMARY KEY ("id")
|
||||
);
|
||||
|
||||
-- CreateTable
|
||||
CREATE TABLE "OffersEducation" (
|
||||
"id" TEXT NOT NULL,
|
||||
"type" TEXT,
|
||||
"field" TEXT,
|
||||
"isAttending" BOOLEAN,
|
||||
"school" TEXT,
|
||||
"startDate" TIMESTAMP(3),
|
||||
"endDate" TIMESTAMP(3),
|
||||
"backgroundId" TEXT NOT NULL,
|
||||
|
||||
CONSTRAINT "OffersEducation_pkey" PRIMARY KEY ("id")
|
||||
);
|
||||
|
||||
-- CreateTable
|
||||
CREATE TABLE "OffersReply" (
|
||||
"id" TEXT NOT NULL,
|
||||
"creator" TEXT NOT NULL,
|
||||
"createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
"message" TEXT NOT NULL,
|
||||
"replyingToId" TEXT,
|
||||
"profileId" TEXT NOT NULL,
|
||||
|
||||
CONSTRAINT "OffersReply_pkey" PRIMARY KEY ("id")
|
||||
);
|
||||
|
||||
-- CreateTable
|
||||
CREATE TABLE "OffersOffer" (
|
||||
"id" TEXT NOT NULL,
|
||||
"profileId" TEXT NOT NULL,
|
||||
"companyId" TEXT NOT NULL,
|
||||
"monthYearReceived" TIMESTAMP(3) NOT NULL,
|
||||
"location" TEXT NOT NULL,
|
||||
"negotiationStrategy" TEXT,
|
||||
"comments" TEXT,
|
||||
"jobType" "JobType" NOT NULL,
|
||||
|
||||
CONSTRAINT "OffersOffer_pkey" PRIMARY KEY ("id")
|
||||
);
|
||||
|
||||
-- CreateTable
|
||||
CREATE TABLE "OffersIntern" (
|
||||
"offerId" TEXT NOT NULL,
|
||||
"title" TEXT NOT NULL,
|
||||
"specialization" TEXT NOT NULL,
|
||||
"internshipCycle" TEXT NOT NULL,
|
||||
"startYear" INTEGER NOT NULL,
|
||||
"monthlySalaryId" TEXT NOT NULL,
|
||||
|
||||
CONSTRAINT "OffersIntern_pkey" PRIMARY KEY ("offerId")
|
||||
);
|
||||
|
||||
-- CreateTable
|
||||
CREATE TABLE "OffersFullTime" (
|
||||
"offerId" TEXT NOT NULL,
|
||||
"title" TEXT NOT NULL,
|
||||
"specialization" TEXT NOT NULL,
|
||||
"level" TEXT NOT NULL,
|
||||
"totalCompensationId" TEXT NOT NULL,
|
||||
"baseSalaryId" TEXT NOT NULL,
|
||||
"bonusId" TEXT NOT NULL,
|
||||
"stocksId" TEXT NOT NULL,
|
||||
|
||||
CONSTRAINT "OffersFullTime_pkey" PRIMARY KEY ("offerId")
|
||||
);
|
||||
|
||||
-- CreateIndex
|
||||
CREATE UNIQUE INDEX "OffersBackground_offersProfileId_key" ON "OffersBackground"("offersProfileId");
|
||||
|
||||
-- CreateIndex
|
||||
CREATE UNIQUE INDEX "OffersExperience_totalCompensationId_key" ON "OffersExperience"("totalCompensationId");
|
||||
|
||||
-- CreateIndex
|
||||
CREATE UNIQUE INDEX "OffersExperience_monthlySalaryId_key" ON "OffersExperience"("monthlySalaryId");
|
||||
|
||||
-- CreateIndex
|
||||
CREATE UNIQUE INDEX "OffersIntern_monthlySalaryId_key" ON "OffersIntern"("monthlySalaryId");
|
||||
|
||||
-- CreateIndex
|
||||
CREATE UNIQUE INDEX "OffersFullTime_totalCompensationId_key" ON "OffersFullTime"("totalCompensationId");
|
||||
|
||||
-- CreateIndex
|
||||
CREATE UNIQUE INDEX "OffersFullTime_baseSalaryId_key" ON "OffersFullTime"("baseSalaryId");
|
||||
|
||||
-- CreateIndex
|
||||
CREATE UNIQUE INDEX "OffersFullTime_bonusId_key" ON "OffersFullTime"("bonusId");
|
||||
|
||||
-- CreateIndex
|
||||
CREATE UNIQUE INDEX "OffersFullTime_stocksId_key" ON "OffersFullTime"("stocksId");
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE "OffersProfile" ADD CONSTRAINT "OffersProfile_userId_fkey" FOREIGN KEY ("userId") REFERENCES "User"("id") ON DELETE SET NULL ON UPDATE CASCADE;
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE "OffersBackground" ADD CONSTRAINT "OffersBackground_offersProfileId_fkey" FOREIGN KEY ("offersProfileId") REFERENCES "OffersProfile"("id") ON DELETE RESTRICT ON UPDATE CASCADE;
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE "OffersSpecificYoe" ADD CONSTRAINT "OffersSpecificYoe_backgroundId_fkey" FOREIGN KEY ("backgroundId") REFERENCES "OffersBackground"("id") ON DELETE RESTRICT ON UPDATE CASCADE;
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE "OffersExperience" ADD CONSTRAINT "OffersExperience_companyId_fkey" FOREIGN KEY ("companyId") REFERENCES "Company"("id") ON DELETE SET NULL ON UPDATE CASCADE;
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE "OffersExperience" ADD CONSTRAINT "OffersExperience_totalCompensationId_fkey" FOREIGN KEY ("totalCompensationId") REFERENCES "OffersCurrency"("id") ON DELETE SET NULL ON UPDATE CASCADE;
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE "OffersExperience" ADD CONSTRAINT "OffersExperience_monthlySalaryId_fkey" FOREIGN KEY ("monthlySalaryId") REFERENCES "OffersCurrency"("id") ON DELETE SET NULL ON UPDATE CASCADE;
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE "OffersExperience" ADD CONSTRAINT "OffersExperience_backgroundId_fkey" FOREIGN KEY ("backgroundId") REFERENCES "OffersBackground"("id") ON DELETE RESTRICT ON UPDATE CASCADE;
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE "OffersEducation" ADD CONSTRAINT "OffersEducation_backgroundId_fkey" FOREIGN KEY ("backgroundId") REFERENCES "OffersBackground"("id") ON DELETE RESTRICT ON UPDATE CASCADE;
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE "OffersReply" ADD CONSTRAINT "OffersReply_replyingToId_fkey" FOREIGN KEY ("replyingToId") REFERENCES "OffersReply"("id") ON DELETE SET NULL ON UPDATE CASCADE;
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE "OffersReply" ADD CONSTRAINT "OffersReply_profileId_fkey" FOREIGN KEY ("profileId") REFERENCES "OffersProfile"("id") ON DELETE RESTRICT ON UPDATE CASCADE;
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE "OffersOffer" ADD CONSTRAINT "OffersOffer_profileId_fkey" FOREIGN KEY ("profileId") REFERENCES "OffersProfile"("id") ON DELETE RESTRICT ON UPDATE CASCADE;
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE "OffersOffer" ADD CONSTRAINT "OffersOffer_companyId_fkey" FOREIGN KEY ("companyId") REFERENCES "Company"("id") ON DELETE RESTRICT ON UPDATE CASCADE;
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE "OffersIntern" ADD CONSTRAINT "OffersIntern_offerId_fkey" FOREIGN KEY ("offerId") REFERENCES "OffersOffer"("id") ON DELETE RESTRICT ON UPDATE CASCADE;
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE "OffersIntern" ADD CONSTRAINT "OffersIntern_monthlySalaryId_fkey" FOREIGN KEY ("monthlySalaryId") REFERENCES "OffersCurrency"("id") ON DELETE RESTRICT ON UPDATE CASCADE;
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE "OffersFullTime" ADD CONSTRAINT "OffersFullTime_offerId_fkey" FOREIGN KEY ("offerId") REFERENCES "OffersOffer"("id") ON DELETE RESTRICT ON UPDATE CASCADE;
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE "OffersFullTime" ADD CONSTRAINT "OffersFullTime_totalCompensationId_fkey" FOREIGN KEY ("totalCompensationId") REFERENCES "OffersCurrency"("id") ON DELETE RESTRICT ON UPDATE CASCADE;
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE "OffersFullTime" ADD CONSTRAINT "OffersFullTime_baseSalaryId_fkey" FOREIGN KEY ("baseSalaryId") REFERENCES "OffersCurrency"("id") ON DELETE RESTRICT ON UPDATE CASCADE;
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE "OffersFullTime" ADD CONSTRAINT "OffersFullTime_bonusId_fkey" FOREIGN KEY ("bonusId") REFERENCES "OffersCurrency"("id") ON DELETE RESTRICT ON UPDATE CASCADE;
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE "OffersFullTime" ADD CONSTRAINT "OffersFullTime_stocksId_fkey" FOREIGN KEY ("stocksId") REFERENCES "OffersCurrency"("id") ON DELETE RESTRICT ON UPDATE CASCADE;
|
|
@ -0,0 +1,13 @@
|
|||
/*
|
||||
Warnings:
|
||||
|
||||
- You are about to drop the column `company` on the `QuestionsQuestionEncounter` table. All the data in the column will be lost.
|
||||
- Added the required column `companyId` to the `QuestionsQuestionEncounter` table without a default value. This is not possible if the table is not empty.
|
||||
|
||||
*/
|
||||
-- AlterTable
|
||||
ALTER TABLE "QuestionsQuestionEncounter" DROP COLUMN "company",
|
||||
ADD COLUMN "companyId" TEXT NOT NULL;
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE "QuestionsQuestionEncounter" ADD CONSTRAINT "QuestionsQuestionEncounter_companyId_fkey" FOREIGN KEY ("companyId") REFERENCES "Company"("id") ON DELETE SET NULL ON UPDATE CASCADE;
|
|
@ -0,0 +1,120 @@
|
|||
/*
|
||||
Warnings:
|
||||
|
||||
- You are about to drop the column `isAttending` on the `OffersEducation` table. All the data in the column will be lost.
|
||||
- The primary key for the `OffersFullTime` table will be changed. If it partially fails, the table could be left without primary key constraint.
|
||||
- You are about to drop the column `offerId` on the `OffersFullTime` table. All the data in the column will be lost.
|
||||
- The primary key for the `OffersIntern` table will be changed. If it partially fails, the table could be left without primary key constraint.
|
||||
- You are about to drop the column `offerId` on the `OffersIntern` table. All the data in the column will be lost.
|
||||
- A unique constraint covering the columns `[offersInternId]` on the table `OffersOffer` will be added. If there are existing duplicate values, this will fail.
|
||||
- A unique constraint covering the columns `[offersFullTimeId]` on the table `OffersOffer` will be added. If there are existing duplicate values, this will fail.
|
||||
- A unique constraint covering the columns `[profileName]` on the table `OffersProfile` will be added. If there are existing duplicate values, this will fail.
|
||||
- The required column `id` was added to the `OffersFullTime` table with a prisma-level default value. This is not possible if the table is not empty. Please add this column as optional, then populate it before making it required.
|
||||
- The required column `id` was added to the `OffersIntern` table with a prisma-level default value. This is not possible if the table is not empty. Please add this column as optional, then populate it before making it required.
|
||||
|
||||
*/
|
||||
-- DropForeignKey
|
||||
ALTER TABLE "OffersBackground" DROP CONSTRAINT "OffersBackground_offersProfileId_fkey";
|
||||
|
||||
-- DropForeignKey
|
||||
ALTER TABLE "OffersEducation" DROP CONSTRAINT "OffersEducation_backgroundId_fkey";
|
||||
|
||||
-- DropForeignKey
|
||||
ALTER TABLE "OffersExperience" DROP CONSTRAINT "OffersExperience_backgroundId_fkey";
|
||||
|
||||
-- DropForeignKey
|
||||
ALTER TABLE "OffersFullTime" DROP CONSTRAINT "OffersFullTime_baseSalaryId_fkey";
|
||||
|
||||
-- DropForeignKey
|
||||
ALTER TABLE "OffersFullTime" DROP CONSTRAINT "OffersFullTime_bonusId_fkey";
|
||||
|
||||
-- DropForeignKey
|
||||
ALTER TABLE "OffersFullTime" DROP CONSTRAINT "OffersFullTime_offerId_fkey";
|
||||
|
||||
-- DropForeignKey
|
||||
ALTER TABLE "OffersFullTime" DROP CONSTRAINT "OffersFullTime_stocksId_fkey";
|
||||
|
||||
-- DropForeignKey
|
||||
ALTER TABLE "OffersFullTime" DROP CONSTRAINT "OffersFullTime_totalCompensationId_fkey";
|
||||
|
||||
-- DropForeignKey
|
||||
ALTER TABLE "OffersIntern" DROP CONSTRAINT "OffersIntern_monthlySalaryId_fkey";
|
||||
|
||||
-- DropForeignKey
|
||||
ALTER TABLE "OffersIntern" DROP CONSTRAINT "OffersIntern_offerId_fkey";
|
||||
|
||||
-- DropForeignKey
|
||||
ALTER TABLE "OffersOffer" DROP CONSTRAINT "OffersOffer_profileId_fkey";
|
||||
|
||||
-- DropForeignKey
|
||||
ALTER TABLE "OffersReply" DROP CONSTRAINT "OffersReply_profileId_fkey";
|
||||
|
||||
-- DropForeignKey
|
||||
ALTER TABLE "OffersSpecificYoe" DROP CONSTRAINT "OffersSpecificYoe_backgroundId_fkey";
|
||||
|
||||
-- AlterTable
|
||||
ALTER TABLE "OffersEducation" DROP COLUMN "isAttending";
|
||||
|
||||
-- AlterTable
|
||||
ALTER TABLE "OffersFullTime" DROP CONSTRAINT "OffersFullTime_pkey",
|
||||
DROP COLUMN "offerId",
|
||||
ADD COLUMN "id" TEXT NOT NULL,
|
||||
ADD CONSTRAINT "OffersFullTime_pkey" PRIMARY KEY ("id");
|
||||
|
||||
-- AlterTable
|
||||
ALTER TABLE "OffersIntern" DROP CONSTRAINT "OffersIntern_pkey",
|
||||
DROP COLUMN "offerId",
|
||||
ADD COLUMN "id" TEXT NOT NULL,
|
||||
ADD CONSTRAINT "OffersIntern_pkey" PRIMARY KEY ("id");
|
||||
|
||||
-- AlterTable
|
||||
ALTER TABLE "OffersOffer" ADD COLUMN "offersFullTimeId" TEXT,
|
||||
ADD COLUMN "offersInternId" TEXT;
|
||||
|
||||
-- CreateIndex
|
||||
CREATE UNIQUE INDEX "OffersOffer_offersInternId_key" ON "OffersOffer"("offersInternId");
|
||||
|
||||
-- CreateIndex
|
||||
CREATE UNIQUE INDEX "OffersOffer_offersFullTimeId_key" ON "OffersOffer"("offersFullTimeId");
|
||||
|
||||
-- CreateIndex
|
||||
CREATE UNIQUE INDEX "OffersProfile_profileName_key" ON "OffersProfile"("profileName");
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE "OffersBackground" ADD CONSTRAINT "OffersBackground_offersProfileId_fkey" FOREIGN KEY ("offersProfileId") REFERENCES "OffersProfile"("id") ON DELETE CASCADE ON UPDATE CASCADE;
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE "OffersSpecificYoe" ADD CONSTRAINT "OffersSpecificYoe_backgroundId_fkey" FOREIGN KEY ("backgroundId") REFERENCES "OffersBackground"("id") ON DELETE CASCADE ON UPDATE CASCADE;
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE "OffersExperience" ADD CONSTRAINT "OffersExperience_backgroundId_fkey" FOREIGN KEY ("backgroundId") REFERENCES "OffersBackground"("id") ON DELETE CASCADE ON UPDATE CASCADE;
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE "OffersEducation" ADD CONSTRAINT "OffersEducation_backgroundId_fkey" FOREIGN KEY ("backgroundId") REFERENCES "OffersBackground"("id") ON DELETE CASCADE ON UPDATE CASCADE;
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE "OffersReply" ADD CONSTRAINT "OffersReply_profileId_fkey" FOREIGN KEY ("profileId") REFERENCES "OffersProfile"("id") ON DELETE CASCADE ON UPDATE CASCADE;
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE "OffersOffer" ADD CONSTRAINT "OffersOffer_profileId_fkey" FOREIGN KEY ("profileId") REFERENCES "OffersProfile"("id") ON DELETE CASCADE ON UPDATE CASCADE;
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE "OffersOffer" ADD CONSTRAINT "OffersOffer_offersInternId_fkey" FOREIGN KEY ("offersInternId") REFERENCES "OffersIntern"("id") ON DELETE CASCADE ON UPDATE CASCADE;
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE "OffersOffer" ADD CONSTRAINT "OffersOffer_offersFullTimeId_fkey" FOREIGN KEY ("offersFullTimeId") REFERENCES "OffersFullTime"("id") ON DELETE CASCADE ON UPDATE CASCADE;
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE "OffersIntern" ADD CONSTRAINT "OffersIntern_monthlySalaryId_fkey" FOREIGN KEY ("monthlySalaryId") REFERENCES "OffersCurrency"("id") ON DELETE CASCADE ON UPDATE CASCADE;
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE "OffersFullTime" ADD CONSTRAINT "OffersFullTime_totalCompensationId_fkey" FOREIGN KEY ("totalCompensationId") REFERENCES "OffersCurrency"("id") ON DELETE CASCADE ON UPDATE CASCADE;
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE "OffersFullTime" ADD CONSTRAINT "OffersFullTime_baseSalaryId_fkey" FOREIGN KEY ("baseSalaryId") REFERENCES "OffersCurrency"("id") ON DELETE CASCADE ON UPDATE CASCADE;
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE "OffersFullTime" ADD CONSTRAINT "OffersFullTime_bonusId_fkey" FOREIGN KEY ("bonusId") REFERENCES "OffersCurrency"("id") ON DELETE CASCADE ON UPDATE CASCADE;
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE "OffersFullTime" ADD CONSTRAINT "OffersFullTime_stocksId_fkey" FOREIGN KEY ("stocksId") REFERENCES "OffersCurrency"("id") ON DELETE CASCADE ON UPDATE CASCADE;
|
|
@ -0,0 +1,12 @@
|
|||
/*
|
||||
Warnings:
|
||||
|
||||
- You are about to drop the column `creator` on the `OffersReply` table. All the data in the column will be lost.
|
||||
|
||||
*/
|
||||
-- AlterTable
|
||||
ALTER TABLE "OffersReply" DROP COLUMN "creator",
|
||||
ADD COLUMN "userId" TEXT;
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE "OffersReply" ADD CONSTRAINT "OffersReply_userId_fkey" FOREIGN KEY ("userId") REFERENCES "User"("id") ON DELETE SET NULL ON UPDATE CASCADE;
|
|
@ -0,0 +1,9 @@
|
|||
/*
|
||||
Warnings:
|
||||
|
||||
- Changed the type of `value` on the `ResumesCommentVote` table. No cast exists, the column would be dropped and recreated, which cannot be done if there is data, since the column is required.
|
||||
|
||||
*/
|
||||
-- AlterTable
|
||||
ALTER TABLE "ResumesCommentVote" DROP COLUMN "value",
|
||||
ADD COLUMN "value" "Vote" NOT NULL;
|
|
@ -0,0 +1,60 @@
|
|||
-- CreateTable
|
||||
CREATE TABLE "OffersAnalysis" (
|
||||
"id" TEXT NOT NULL,
|
||||
"profileId" TEXT NOT NULL,
|
||||
"offerId" TEXT NOT NULL,
|
||||
"overallPercentile" INTEGER NOT NULL,
|
||||
"noOfSimilarOffers" INTEGER NOT NULL,
|
||||
"companyPercentile" INTEGER NOT NULL,
|
||||
"noOfSimilarCompanyOffers" INTEGER NOT NULL,
|
||||
|
||||
CONSTRAINT "OffersAnalysis_pkey" PRIMARY KEY ("id")
|
||||
);
|
||||
|
||||
-- CreateTable
|
||||
CREATE TABLE "_TopOverallOffers" (
|
||||
"A" TEXT NOT NULL,
|
||||
"B" TEXT NOT NULL
|
||||
);
|
||||
|
||||
-- CreateTable
|
||||
CREATE TABLE "_TopCompanyOffers" (
|
||||
"A" TEXT NOT NULL,
|
||||
"B" TEXT NOT NULL
|
||||
);
|
||||
|
||||
-- CreateIndex
|
||||
CREATE UNIQUE INDEX "OffersAnalysis_profileId_key" ON "OffersAnalysis"("profileId");
|
||||
|
||||
-- CreateIndex
|
||||
CREATE UNIQUE INDEX "OffersAnalysis_offerId_key" ON "OffersAnalysis"("offerId");
|
||||
|
||||
-- CreateIndex
|
||||
CREATE UNIQUE INDEX "_TopOverallOffers_AB_unique" ON "_TopOverallOffers"("A", "B");
|
||||
|
||||
-- CreateIndex
|
||||
CREATE INDEX "_TopOverallOffers_B_index" ON "_TopOverallOffers"("B");
|
||||
|
||||
-- CreateIndex
|
||||
CREATE UNIQUE INDEX "_TopCompanyOffers_AB_unique" ON "_TopCompanyOffers"("A", "B");
|
||||
|
||||
-- CreateIndex
|
||||
CREATE INDEX "_TopCompanyOffers_B_index" ON "_TopCompanyOffers"("B");
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE "OffersAnalysis" ADD CONSTRAINT "OffersAnalysis_profileId_fkey" FOREIGN KEY ("profileId") REFERENCES "OffersProfile"("id") ON DELETE RESTRICT ON UPDATE CASCADE;
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE "OffersAnalysis" ADD CONSTRAINT "OffersAnalysis_offerId_fkey" FOREIGN KEY ("offerId") REFERENCES "OffersOffer"("id") ON DELETE RESTRICT ON UPDATE CASCADE;
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE "_TopOverallOffers" ADD CONSTRAINT "_TopOverallOffers_A_fkey" FOREIGN KEY ("A") REFERENCES "OffersAnalysis"("id") ON DELETE CASCADE ON UPDATE CASCADE;
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE "_TopOverallOffers" ADD CONSTRAINT "_TopOverallOffers_B_fkey" FOREIGN KEY ("B") REFERENCES "OffersOffer"("id") ON DELETE CASCADE ON UPDATE CASCADE;
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE "_TopCompanyOffers" ADD CONSTRAINT "_TopCompanyOffers_A_fkey" FOREIGN KEY ("A") REFERENCES "OffersAnalysis"("id") ON DELETE CASCADE ON UPDATE CASCADE;
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE "_TopCompanyOffers" ADD CONSTRAINT "_TopCompanyOffers_B_fkey" FOREIGN KEY ("B") REFERENCES "OffersOffer"("id") ON DELETE CASCADE ON UPDATE CASCADE;
|
|
@ -0,0 +1,3 @@
|
|||
-- AlterTable
|
||||
ALTER TABLE "OffersAnalysis" ALTER COLUMN "overallPercentile" SET DATA TYPE DOUBLE PRECISION,
|
||||
ALTER COLUMN "companyPercentile" SET DATA TYPE DOUBLE PRECISION;
|
|
@ -0,0 +1,11 @@
|
|||
-- DropForeignKey
|
||||
ALTER TABLE "OffersAnalysis" DROP CONSTRAINT "OffersAnalysis_offerId_fkey";
|
||||
|
||||
-- DropForeignKey
|
||||
ALTER TABLE "OffersAnalysis" DROP CONSTRAINT "OffersAnalysis_profileId_fkey";
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE "OffersAnalysis" ADD CONSTRAINT "OffersAnalysis_profileId_fkey" FOREIGN KEY ("profileId") REFERENCES "OffersProfile"("id") ON DELETE CASCADE ON UPDATE CASCADE;
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE "OffersAnalysis" ADD CONSTRAINT "OffersAnalysis_offerId_fkey" FOREIGN KEY ("offerId") REFERENCES "OffersOffer"("id") ON DELETE CASCADE ON UPDATE CASCADE;
|
|
@ -0,0 +1,14 @@
|
|||
/*
|
||||
Warnings:
|
||||
|
||||
- Made the column `totalYoe` on table `OffersBackground` required. This step will fail if there are existing NULL values in that column.
|
||||
- Made the column `negotiationStrategy` on table `OffersOffer` required. This step will fail if there are existing NULL values in that column.
|
||||
- Made the column `comments` on table `OffersOffer` required. This step will fail if there are existing NULL values in that column.
|
||||
|
||||
*/
|
||||
-- AlterTable
|
||||
ALTER TABLE "OffersBackground" ALTER COLUMN "totalYoe" SET NOT NULL;
|
||||
|
||||
-- AlterTable
|
||||
ALTER TABLE "OffersOffer" ALTER COLUMN "negotiationStrategy" SET NOT NULL,
|
||||
ALTER COLUMN "comments" SET NOT NULL;
|
|
@ -0,0 +1,5 @@
|
|||
-- AlterTable
|
||||
ALTER TABLE "ResumesComment" ADD COLUMN "parentId" TEXT;
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE "ResumesComment" ADD CONSTRAINT "ResumesComment_parentId_fkey" FOREIGN KEY ("parentId") REFERENCES "ResumesComment"("id") ON DELETE SET NULL ON UPDATE CASCADE;
|
|
@ -0,0 +1,2 @@
|
|||
-- AlterTable
|
||||
ALTER TABLE "OffersExperience" ADD COLUMN "location" TEXT;
|
|
@ -0,0 +1,12 @@
|
|||
/*
|
||||
Warnings:
|
||||
|
||||
- Added the required column `upvotes` to the `QuestionsQuestion` table without a default value. This is not possible if the table is not empty.
|
||||
|
||||
*/
|
||||
-- AlterTable
|
||||
ALTER TABLE "QuestionsQuestion" ADD COLUMN "lastSeenAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
ADD COLUMN "upvotes" INTEGER NOT NULL;
|
||||
|
||||
-- AlterTable
|
||||
ALTER TABLE "QuestionsQuestionEncounter" ADD COLUMN "netVotes" INTEGER NOT NULL DEFAULT 0;
|
|
@ -0,0 +1,12 @@
|
|||
/*
|
||||
Warnings:
|
||||
|
||||
- You are about to drop the column `netVotes` on the `QuestionsQuestionEncounter` table. All the data in the column will be lost.
|
||||
|
||||
*/
|
||||
-- AlterTable
|
||||
ALTER TABLE "QuestionsQuestion" ALTER COLUMN "lastSeenAt" DROP DEFAULT,
|
||||
ALTER COLUMN "upvotes" SET DEFAULT 0;
|
||||
|
||||
-- AlterTable
|
||||
ALTER TABLE "QuestionsQuestionEncounter" DROP COLUMN "netVotes";
|
|
@ -0,0 +1,5 @@
|
|||
-- CreateIndex
|
||||
CREATE INDEX "QuestionsQuestion_lastSeenAt_id_idx" ON "QuestionsQuestion"("lastSeenAt", "id");
|
||||
|
||||
-- CreateIndex
|
||||
CREATE INDEX "QuestionsQuestion_upvotes_id_idx" ON "QuestionsQuestion"("upvotes", "id");
|
|
@ -0,0 +1,12 @@
|
|||
/*
|
||||
Warnings:
|
||||
|
||||
- Added the required column `baseValue` to the `OffersCurrency` table without a default value. This is not possible if the table is not empty.
|
||||
- Added the required column `updatedAt` to the `OffersCurrency` table without a default value. This is not possible if the table is not empty.
|
||||
|
||||
*/
|
||||
-- AlterTable
|
||||
ALTER TABLE "OffersCurrency" ADD COLUMN "baseCurrency" TEXT NOT NULL DEFAULT 'USD',
|
||||
ADD COLUMN "baseValue" INTEGER NOT NULL,
|
||||
ADD COLUMN "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
ADD COLUMN "updatedAt" TIMESTAMP(3) NOT NULL;
|
|
@ -0,0 +1,3 @@
|
|||
-- AlterTable
|
||||
ALTER TABLE "OffersCurrency" ALTER COLUMN "value" SET DATA TYPE DOUBLE PRECISION,
|
||||
ALTER COLUMN "baseValue" SET DATA TYPE DOUBLE PRECISION;
|
|
@ -0,0 +1,2 @@
|
|||
-- AlterTable
|
||||
ALTER TABLE "QuestionsQuestion" ALTER COLUMN "lastSeenAt" DROP NOT NULL;
|
|
@ -0,0 +1,36 @@
|
|||
-- CreateTable
|
||||
CREATE TABLE "QuestionsList" (
|
||||
"id" TEXT NOT NULL,
|
||||
"userId" TEXT NOT NULL,
|
||||
"name" VARCHAR(256) NOT NULL,
|
||||
"createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
"updatedAt" TIMESTAMP(3) NOT NULL,
|
||||
|
||||
CONSTRAINT "QuestionsList_pkey" PRIMARY KEY ("id")
|
||||
);
|
||||
|
||||
-- CreateTable
|
||||
CREATE TABLE "QuestionsListQuestionEntry" (
|
||||
"id" TEXT NOT NULL,
|
||||
"listId" TEXT NOT NULL,
|
||||
"questionId" TEXT NOT NULL,
|
||||
"createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
"updatedAt" TIMESTAMP(3) NOT NULL,
|
||||
|
||||
CONSTRAINT "QuestionsListQuestionEntry_pkey" PRIMARY KEY ("id")
|
||||
);
|
||||
|
||||
-- CreateIndex
|
||||
CREATE UNIQUE INDEX "QuestionsList_userId_name_key" ON "QuestionsList"("userId", "name");
|
||||
|
||||
-- CreateIndex
|
||||
CREATE UNIQUE INDEX "QuestionsListQuestionEntry_listId_questionId_key" ON "QuestionsListQuestionEntry"("listId", "questionId");
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE "QuestionsList" ADD CONSTRAINT "QuestionsList_userId_fkey" FOREIGN KEY ("userId") REFERENCES "User"("id") ON DELETE CASCADE ON UPDATE CASCADE;
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE "QuestionsListQuestionEntry" ADD CONSTRAINT "QuestionsListQuestionEntry_listId_fkey" FOREIGN KEY ("listId") REFERENCES "QuestionsList"("id") ON DELETE CASCADE ON UPDATE CASCADE;
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE "QuestionsListQuestionEntry" ADD CONSTRAINT "QuestionsListQuestionEntry_questionId_fkey" FOREIGN KEY ("questionId") REFERENCES "QuestionsQuestion"("id") ON DELETE CASCADE ON UPDATE CASCADE;
|
|
@ -0,0 +1,2 @@
|
|||
-- AlterTable
|
||||
ALTER TABLE "OffersBackground" ALTER COLUMN "totalYoe" SET DEFAULT 0;
|
|
@ -0,0 +1,14 @@
|
|||
/*
|
||||
Warnings:
|
||||
|
||||
- Added the required column `upvotes` to the `QuestionsAnswerComment` table without a default value. This is not possible if the table is not empty.
|
||||
|
||||
*/
|
||||
-- AlterTable
|
||||
ALTER TABLE "QuestionsAnswer" ADD COLUMN "upvotes" INTEGER NOT NULL DEFAULT 0;
|
||||
|
||||
-- AlterTable
|
||||
ALTER TABLE "QuestionsAnswerComment" ADD COLUMN "upvotes" INTEGER NOT NULL;
|
||||
|
||||
-- AlterTable
|
||||
ALTER TABLE "QuestionsQuestionComment" ADD COLUMN "upvotes" INTEGER NOT NULL DEFAULT 0;
|
|
@ -0,0 +1,2 @@
|
|||
-- AlterTable
|
||||
ALTER TABLE "QuestionsAnswerComment" ALTER COLUMN "upvotes" SET DEFAULT 0;
|
|
@ -0,0 +1,19 @@
|
|||
/*
|
||||
Warnings:
|
||||
|
||||
- You are about to drop the column `specialization` on the `OffersExperience` table. All the data in the column will be lost.
|
||||
- You are about to drop the column `specialization` on the `OffersFullTime` table. All the data in the column will be lost.
|
||||
- You are about to drop the column `specialization` on the `OffersIntern` table. All the data in the column will be lost.
|
||||
|
||||
*/
|
||||
-- AlterTable
|
||||
ALTER TABLE "OffersExperience" DROP COLUMN "specialization";
|
||||
|
||||
-- AlterTable
|
||||
ALTER TABLE "OffersFullTime" DROP COLUMN "specialization",
|
||||
ALTER COLUMN "baseSalaryId" DROP NOT NULL,
|
||||
ALTER COLUMN "bonusId" DROP NOT NULL,
|
||||
ALTER COLUMN "stocksId" DROP NOT NULL;
|
||||
|
||||
-- AlterTable
|
||||
ALTER TABLE "OffersIntern" DROP COLUMN "specialization";
|
|
@ -0,0 +1,2 @@
|
|||
-- AlterTable
|
||||
ALTER TABLE "ResumesResume" ADD COLUMN "isResolved" BOOLEAN NOT NULL DEFAULT false;
|
|
@ -0,0 +1,5 @@
|
|||
-- AlterTable
|
||||
ALTER TABLE "QuestionsQuestion" ADD COLUMN "numEncounters" INTEGER NOT NULL DEFAULT 0;
|
||||
|
||||
-- CreateIndex
|
||||
CREATE INDEX "QuestionsQuestion_numEncounters_id_idx" ON "QuestionsQuestion"("numEncounters", "id");
|
|
@ -0,0 +1,44 @@
|
|||
-- CreateTable
|
||||
CREATE TABLE "Country" (
|
||||
"id" TEXT NOT NULL,
|
||||
"name" TEXT NOT NULL,
|
||||
"code" TEXT NOT NULL,
|
||||
|
||||
CONSTRAINT "Country_pkey" PRIMARY KEY ("id")
|
||||
);
|
||||
|
||||
-- CreateTable
|
||||
CREATE TABLE "State" (
|
||||
"id" TEXT NOT NULL,
|
||||
"name" TEXT NOT NULL,
|
||||
"countryId" TEXT NOT NULL,
|
||||
|
||||
CONSTRAINT "State_pkey" PRIMARY KEY ("id")
|
||||
);
|
||||
|
||||
-- CreateTable
|
||||
CREATE TABLE "City" (
|
||||
"id" TEXT NOT NULL,
|
||||
"name" TEXT NOT NULL,
|
||||
"stateId" TEXT NOT NULL,
|
||||
|
||||
CONSTRAINT "City_pkey" PRIMARY KEY ("id")
|
||||
);
|
||||
|
||||
-- CreateIndex
|
||||
CREATE UNIQUE INDEX "Country_name_key" ON "Country"("name");
|
||||
|
||||
-- CreateIndex
|
||||
CREATE UNIQUE INDEX "Country_code_key" ON "Country"("code");
|
||||
|
||||
-- CreateIndex
|
||||
CREATE UNIQUE INDEX "State_name_countryId_key" ON "State"("name", "countryId");
|
||||
|
||||
-- CreateIndex
|
||||
CREATE UNIQUE INDEX "City_name_stateId_key" ON "City"("name", "stateId");
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE "State" ADD CONSTRAINT "State_countryId_fkey" FOREIGN KEY ("countryId") REFERENCES "Country"("id") ON DELETE RESTRICT ON UPDATE CASCADE;
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE "City" ADD CONSTRAINT "City_stateId_fkey" FOREIGN KEY ("stateId") REFERENCES "State"("id") ON DELETE RESTRICT ON UPDATE CASCADE;
|
|
@ -0,0 +1,39 @@
|
|||
/*
|
||||
Warnings:
|
||||
|
||||
- You are about to drop the column `location` on the `QuestionsQuestionEncounter` table. All the data in the column will be lost.
|
||||
|
||||
*/
|
||||
-- AlterTable
|
||||
ALTER TABLE "QuestionsQuestionEncounter" DROP COLUMN "location",
|
||||
ADD COLUMN "cityId" TEXT,
|
||||
ADD COLUMN "countryId" TEXT,
|
||||
ADD COLUMN "stateId" TEXT,
|
||||
ALTER COLUMN "companyId" DROP NOT NULL;
|
||||
|
||||
-- CreateIndex
|
||||
CREATE INDEX "QuestionsAnswer_updatedAt_id_idx" ON "QuestionsAnswer"("updatedAt", "id");
|
||||
|
||||
-- CreateIndex
|
||||
CREATE INDEX "QuestionsAnswer_upvotes_id_idx" ON "QuestionsAnswer"("upvotes", "id");
|
||||
|
||||
-- CreateIndex
|
||||
CREATE INDEX "QuestionsAnswerComment_updatedAt_id_idx" ON "QuestionsAnswerComment"("updatedAt", "id");
|
||||
|
||||
-- CreateIndex
|
||||
CREATE INDEX "QuestionsAnswerComment_upvotes_id_idx" ON "QuestionsAnswerComment"("upvotes", "id");
|
||||
|
||||
-- CreateIndex
|
||||
CREATE INDEX "QuestionsQuestionComment_updatedAt_id_idx" ON "QuestionsQuestionComment"("updatedAt", "id");
|
||||
|
||||
-- CreateIndex
|
||||
CREATE INDEX "QuestionsQuestionComment_upvotes_id_idx" ON "QuestionsQuestionComment"("upvotes", "id");
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE "QuestionsQuestionEncounter" ADD CONSTRAINT "QuestionsQuestionEncounter_countryId_fkey" FOREIGN KEY ("countryId") REFERENCES "Country"("id") ON DELETE SET NULL ON UPDATE CASCADE;
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE "QuestionsQuestionEncounter" ADD CONSTRAINT "QuestionsQuestionEncounter_stateId_fkey" FOREIGN KEY ("stateId") REFERENCES "State"("id") ON DELETE SET NULL ON UPDATE CASCADE;
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE "QuestionsQuestionEncounter" ADD CONSTRAINT "QuestionsQuestionEncounter_cityId_fkey" FOREIGN KEY ("cityId") REFERENCES "City"("id") ON DELETE SET NULL ON UPDATE CASCADE;
|
|
@ -0,0 +1,2 @@
|
|||
-- AlterEnum
|
||||
ALTER TYPE "QuestionsQuestionType" ADD VALUE 'THEORY';
|
|
@ -0,0 +1,113 @@
|
|||
/*
|
||||
Warnings:
|
||||
|
||||
- You are about to drop the column `companyPercentile` on the `OffersAnalysis` table. All the data in the column will be lost.
|
||||
- You are about to drop the column `noOfSimilarCompanyOffers` on the `OffersAnalysis` table. All the data in the column will be lost.
|
||||
- You are about to drop the column `noOfSimilarOffers` on the `OffersAnalysis` table. All the data in the column will be lost.
|
||||
- You are about to drop the column `overallPercentile` on the `OffersAnalysis` table. All the data in the column will be lost.
|
||||
- You are about to drop the column `userId` on the `OffersProfile` table. All the data in the column will be lost.
|
||||
- You are about to drop the `_TopCompanyOffers` table. If the table is not empty, all the data it contains will be lost.
|
||||
- You are about to drop the `_TopOverallOffers` table. If the table is not empty, all the data it contains will be lost.
|
||||
- Added the required column `overallAnalysisUnitId` to the `OffersAnalysis` table without a default value. This is not possible if the table is not empty.
|
||||
- Added the required column `updatedAt` to the `OffersAnalysis` table without a default value. This is not possible if the table is not empty.
|
||||
|
||||
*/
|
||||
-- DropForeignKey
|
||||
ALTER TABLE "OffersProfile" DROP CONSTRAINT "OffersProfile_userId_fkey";
|
||||
|
||||
-- DropForeignKey
|
||||
ALTER TABLE "_TopCompanyOffers" DROP CONSTRAINT "_TopCompanyOffers_A_fkey";
|
||||
|
||||
-- DropForeignKey
|
||||
ALTER TABLE "_TopCompanyOffers" DROP CONSTRAINT "_TopCompanyOffers_B_fkey";
|
||||
|
||||
-- DropForeignKey
|
||||
ALTER TABLE "_TopOverallOffers" DROP CONSTRAINT "_TopOverallOffers_A_fkey";
|
||||
|
||||
-- DropForeignKey
|
||||
ALTER TABLE "_TopOverallOffers" DROP CONSTRAINT "_TopOverallOffers_B_fkey";
|
||||
|
||||
-- AlterTable
|
||||
ALTER TABLE "OffersAnalysis" DROP COLUMN "companyPercentile",
|
||||
DROP COLUMN "noOfSimilarCompanyOffers",
|
||||
DROP COLUMN "noOfSimilarOffers",
|
||||
DROP COLUMN "overallPercentile",
|
||||
ADD COLUMN "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
ADD COLUMN "overallAnalysisUnitId" TEXT NOT NULL,
|
||||
ADD COLUMN "updatedAt" TIMESTAMP(3) NOT NULL;
|
||||
|
||||
-- AlterTable
|
||||
ALTER TABLE "OffersProfile" DROP COLUMN "userId";
|
||||
|
||||
-- DropTable
|
||||
DROP TABLE "_TopCompanyOffers";
|
||||
|
||||
-- DropTable
|
||||
DROP TABLE "_TopOverallOffers";
|
||||
|
||||
-- CreateTable
|
||||
CREATE TABLE "OffersAnalysisUnit" (
|
||||
"id" TEXT NOT NULL,
|
||||
"companyName" TEXT NOT NULL,
|
||||
"percentile" DOUBLE PRECISION NOT NULL,
|
||||
"noOfSimilarOffers" INTEGER NOT NULL,
|
||||
|
||||
CONSTRAINT "OffersAnalysisUnit_pkey" PRIMARY KEY ("id")
|
||||
);
|
||||
|
||||
-- CreateTable
|
||||
CREATE TABLE "_OffersProfileToUser" (
|
||||
"A" TEXT NOT NULL,
|
||||
"B" TEXT NOT NULL
|
||||
);
|
||||
|
||||
-- CreateTable
|
||||
CREATE TABLE "_CompanyAnalysis" (
|
||||
"A" TEXT NOT NULL,
|
||||
"B" TEXT NOT NULL
|
||||
);
|
||||
|
||||
-- CreateTable
|
||||
CREATE TABLE "_OffersAnalysisUnitToOffersOffer" (
|
||||
"A" TEXT NOT NULL,
|
||||
"B" TEXT NOT NULL
|
||||
);
|
||||
|
||||
-- CreateIndex
|
||||
CREATE UNIQUE INDEX "_OffersProfileToUser_AB_unique" ON "_OffersProfileToUser"("A", "B");
|
||||
|
||||
-- CreateIndex
|
||||
CREATE INDEX "_OffersProfileToUser_B_index" ON "_OffersProfileToUser"("B");
|
||||
|
||||
-- CreateIndex
|
||||
CREATE UNIQUE INDEX "_CompanyAnalysis_AB_unique" ON "_CompanyAnalysis"("A", "B");
|
||||
|
||||
-- CreateIndex
|
||||
CREATE INDEX "_CompanyAnalysis_B_index" ON "_CompanyAnalysis"("B");
|
||||
|
||||
-- CreateIndex
|
||||
CREATE UNIQUE INDEX "_OffersAnalysisUnitToOffersOffer_AB_unique" ON "_OffersAnalysisUnitToOffersOffer"("A", "B");
|
||||
|
||||
-- CreateIndex
|
||||
CREATE INDEX "_OffersAnalysisUnitToOffersOffer_B_index" ON "_OffersAnalysisUnitToOffersOffer"("B");
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE "OffersAnalysis" ADD CONSTRAINT "OffersAnalysis_overallAnalysisUnitId_fkey" FOREIGN KEY ("overallAnalysisUnitId") REFERENCES "OffersAnalysisUnit"("id") ON DELETE RESTRICT ON UPDATE CASCADE;
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE "_OffersProfileToUser" ADD CONSTRAINT "_OffersProfileToUser_A_fkey" FOREIGN KEY ("A") REFERENCES "OffersProfile"("id") ON DELETE CASCADE ON UPDATE CASCADE;
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE "_OffersProfileToUser" ADD CONSTRAINT "_OffersProfileToUser_B_fkey" FOREIGN KEY ("B") REFERENCES "User"("id") ON DELETE CASCADE ON UPDATE CASCADE;
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE "_CompanyAnalysis" ADD CONSTRAINT "_CompanyAnalysis_A_fkey" FOREIGN KEY ("A") REFERENCES "OffersAnalysis"("id") ON DELETE CASCADE ON UPDATE CASCADE;
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE "_CompanyAnalysis" ADD CONSTRAINT "_CompanyAnalysis_B_fkey" FOREIGN KEY ("B") REFERENCES "OffersAnalysisUnit"("id") ON DELETE CASCADE ON UPDATE CASCADE;
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE "_OffersAnalysisUnitToOffersOffer" ADD CONSTRAINT "_OffersAnalysisUnitToOffersOffer_A_fkey" FOREIGN KEY ("A") REFERENCES "OffersAnalysisUnit"("id") ON DELETE CASCADE ON UPDATE CASCADE;
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE "_OffersAnalysisUnitToOffersOffer" ADD CONSTRAINT "_OffersAnalysisUnitToOffersOffer_B_fkey" FOREIGN KEY ("B") REFERENCES "OffersOffer"("id") ON DELETE CASCADE ON UPDATE CASCADE;
|
|
@ -0,0 +1,21 @@
|
|||
/*
|
||||
Warnings:
|
||||
|
||||
- You are about to drop the column `location` on the `OffersExperience` table. All the data in the column will be lost.
|
||||
- You are about to drop the column `location` on the `OffersOffer` table. All the data in the column will be lost.
|
||||
- Added the required column `cityId` to the `OffersOffer` table without a default value. This is not possible if the table is not empty.
|
||||
|
||||
*/
|
||||
-- AlterTable
|
||||
ALTER TABLE "OffersExperience" DROP COLUMN "location",
|
||||
ADD COLUMN "cityId" TEXT;
|
||||
|
||||
-- AlterTable
|
||||
ALTER TABLE "OffersOffer" DROP COLUMN "location",
|
||||
ADD COLUMN "cityId" TEXT NOT NULL;
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE "OffersExperience" ADD CONSTRAINT "OffersExperience_cityId_fkey" FOREIGN KEY ("cityId") REFERENCES "City"("id") ON DELETE SET NULL ON UPDATE CASCADE;
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE "OffersOffer" ADD CONSTRAINT "OffersOffer_cityId_fkey" FOREIGN KEY ("cityId") REFERENCES "City"("id") ON DELETE RESTRICT ON UPDATE CASCADE;
|
|
@ -0,0 +1,13 @@
|
|||
/*
|
||||
Warnings:
|
||||
|
||||
- You are about to drop the column `companyName` on the `OffersAnalysisUnit` table. All the data in the column will be lost.
|
||||
- Added the required column `companyId` to the `OffersAnalysisUnit` table without a default value. This is not possible if the table is not empty.
|
||||
|
||||
*/
|
||||
-- AlterTable
|
||||
ALTER TABLE "OffersAnalysisUnit" DROP COLUMN "companyName",
|
||||
ADD COLUMN "companyId" TEXT NOT NULL;
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE "OffersAnalysisUnit" ADD CONSTRAINT "OffersAnalysisUnit_companyId_fkey" FOREIGN KEY ("companyId") REFERENCES "Company"("id") ON DELETE RESTRICT ON UPDATE CASCADE;
|
|
@ -0,0 +1,16 @@
|
|||
/*
|
||||
Warnings:
|
||||
|
||||
- You are about to drop the column `companyId` on the `OffersAnalysisUnit` table. All the data in the column will be lost.
|
||||
- Added the required column `analysedOfferId` to the `OffersAnalysisUnit` table without a default value. This is not possible if the table is not empty.
|
||||
|
||||
*/
|
||||
-- DropForeignKey
|
||||
ALTER TABLE "OffersAnalysisUnit" DROP CONSTRAINT "OffersAnalysisUnit_companyId_fkey";
|
||||
|
||||
-- AlterTable
|
||||
ALTER TABLE "OffersAnalysisUnit" DROP COLUMN "companyId",
|
||||
ADD COLUMN "analysedOfferId" TEXT NOT NULL;
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE "OffersAnalysisUnit" ADD CONSTRAINT "OffersAnalysisUnit_analysedOfferId_fkey" FOREIGN KEY ("analysedOfferId") REFERENCES "OffersOffer"("id") ON DELETE RESTRICT ON UPDATE CASCADE;
|
|
@ -0,0 +1,5 @@
|
|||
-- DropForeignKey
|
||||
ALTER TABLE "OffersAnalysisUnit" DROP CONSTRAINT "OffersAnalysisUnit_analysedOfferId_fkey";
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE "OffersAnalysisUnit" ADD CONSTRAINT "OffersAnalysisUnit_analysedOfferId_fkey" FOREIGN KEY ("analysedOfferId") REFERENCES "OffersOffer"("id") ON DELETE CASCADE ON UPDATE CASCADE;
|
|
@ -0,0 +1,5 @@
|
|||
-- DropForeignKey
|
||||
ALTER TABLE "OffersAnalysis" DROP CONSTRAINT "OffersAnalysis_overallAnalysisUnitId_fkey";
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE "OffersAnalysis" ADD CONSTRAINT "OffersAnalysis_overallAnalysisUnitId_fkey" FOREIGN KEY ("overallAnalysisUnitId") REFERENCES "OffersAnalysisUnit"("id") ON DELETE CASCADE ON UPDATE CASCADE;
|
|
@ -0,0 +1,13 @@
|
|||
/*
|
||||
Warnings:
|
||||
|
||||
- You are about to drop the column `location` on the `ResumesResume` table. All the data in the column will be lost.
|
||||
- Added the required column `locationId` to the `ResumesResume` table without a default value. This is not possible if the table is not empty.
|
||||
|
||||
*/
|
||||
-- AlterTable. Set default location to Singapore.
|
||||
ALTER TABLE "ResumesResume" DROP COLUMN "location",
|
||||
ADD COLUMN "locationId" TEXT NOT NULL DEFAULT '196';
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE "ResumesResume" ADD CONSTRAINT "ResumesResume_locationId_fkey" FOREIGN KEY ("locationId") REFERENCES "Country"("id") ON DELETE CASCADE ON UPDATE CASCADE;
|
|
@ -0,0 +1,2 @@
|
|||
-- AlterTable
|
||||
ALTER TABLE "ResumesResume" ALTER COLUMN "locationId" DROP DEFAULT;
|
|
@ -0,0 +1,2 @@
|
|||
-- AlterTable
|
||||
ALTER TABLE "Country" ADD COLUMN "ranking" INTEGER DEFAULT 0;
|
|
@ -0,0 +1,2 @@
|
|||
-- AlterTable
|
||||
ALTER TABLE "Company" ADD COLUMN "website" TEXT;
|
|
@ -0,0 +1,5 @@
|
|||
-- DropForeignKey
|
||||
ALTER TABLE "ResumesComment" DROP CONSTRAINT "ResumesComment_parentId_fkey";
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE "ResumesComment" ADD CONSTRAINT "ResumesComment_parentId_fkey" FOREIGN KEY ("parentId") REFERENCES "ResumesComment"("id") ON DELETE CASCADE ON UPDATE CASCADE;
|
|
@ -0,0 +1,5 @@
|
|||
-- AlterTable
|
||||
ALTER TABLE "City" ADD COLUMN "ranking" INTEGER DEFAULT 0;
|
||||
|
||||
-- AlterTable
|
||||
ALTER TABLE "Company" ADD COLUMN "ranking" INTEGER DEFAULT 0;
|
|
@ -0,0 +1,13 @@
|
|||
-- CreateTable
|
||||
CREATE TABLE "OffersAdmin" (
|
||||
"id" TEXT NOT NULL,
|
||||
"userId" TEXT NOT NULL,
|
||||
|
||||
CONSTRAINT "OffersAdmin_pkey" PRIMARY KEY ("id")
|
||||
);
|
||||
|
||||
-- CreateIndex
|
||||
CREATE UNIQUE INDEX "OffersAdmin_userId_key" ON "OffersAdmin"("userId");
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE "OffersAdmin" ADD CONSTRAINT "OffersAdmin_userId_fkey" FOREIGN KEY ("userId") REFERENCES "User"("id") ON DELETE CASCADE ON UPDATE CASCADE;
|
|
@ -0,0 +1,3 @@
|
|||
# Please do not edit this file manually
|
||||
# It should be added in your version-control system (i.e. Git)
|
||||
provider = "postgresql"
|
|
@ -0,0 +1,640 @@
|
|||
// Refer to the Prisma schema docs: https://pris.ly/d/prisma-schema
|
||||
|
||||
generator client {
|
||||
provider = "prisma-client-js"
|
||||
previewFeatures = ["interactiveTransactions"]
|
||||
}
|
||||
|
||||
datasource db {
|
||||
provider = "postgresql"
|
||||
url = env("DATABASE_URL")
|
||||
}
|
||||
|
||||
// Necessary for NextAuth.
|
||||
model Account {
|
||||
id String @id @default(cuid())
|
||||
userId String
|
||||
type String
|
||||
provider String
|
||||
providerAccountId String
|
||||
refresh_token String? @db.Text
|
||||
access_token String? @db.Text
|
||||
expires_at Int?
|
||||
token_type String?
|
||||
scope String?
|
||||
id_token String? @db.Text
|
||||
session_state String?
|
||||
user User @relation(fields: [userId], references: [id], onDelete: Cascade)
|
||||
|
||||
@@unique([provider, providerAccountId])
|
||||
}
|
||||
|
||||
model Session {
|
||||
id String @id @default(cuid())
|
||||
sessionToken String @unique
|
||||
userId String
|
||||
expires DateTime
|
||||
user User @relation(fields: [userId], references: [id], onDelete: Cascade)
|
||||
}
|
||||
|
||||
model User {
|
||||
id String @id @default(cuid())
|
||||
name String?
|
||||
email String? @unique
|
||||
emailVerified DateTime?
|
||||
image String?
|
||||
accounts Account[]
|
||||
sessions Session[]
|
||||
todos Todo[]
|
||||
resumesResumes ResumesResume[]
|
||||
resumesStars ResumesStar[]
|
||||
resumesComments ResumesComment[]
|
||||
resumesCommentVotes ResumesCommentVote[]
|
||||
questionsQuestions QuestionsQuestion[]
|
||||
questionsQuestionEncounters QuestionsQuestionEncounter[]
|
||||
questionsQuestionVotes QuestionsQuestionVote[]
|
||||
questionsQuestionComments QuestionsQuestionComment[]
|
||||
questionsQuestionCommentVotes QuestionsQuestionCommentVote[]
|
||||
questionsAnswers QuestionsAnswer[]
|
||||
questionsAnswerVotes QuestionsAnswerVote[]
|
||||
questionsAnswerComments QuestionsAnswerComment[]
|
||||
questionsAnswerCommentVotes QuestionsAnswerCommentVote[]
|
||||
OffersProfile OffersProfile[]
|
||||
offersDiscussion OffersReply[]
|
||||
questionsLists QuestionsList[]
|
||||
OffersAdmin OffersAdmin?
|
||||
}
|
||||
|
||||
enum Vote {
|
||||
UPVOTE
|
||||
DOWNVOTE
|
||||
}
|
||||
|
||||
model VerificationToken {
|
||||
identifier String
|
||||
token String @unique
|
||||
expires DateTime
|
||||
|
||||
@@unique([identifier, token])
|
||||
}
|
||||
|
||||
model Todo {
|
||||
id String @id @default(cuid())
|
||||
userId String
|
||||
text String @db.Text
|
||||
status TodoStatus @default(INCOMPLETE)
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
user User @relation(fields: [userId], references: [id], onDelete: Cascade)
|
||||
}
|
||||
|
||||
enum TodoStatus {
|
||||
INCOMPLETE
|
||||
COMPLETE
|
||||
}
|
||||
|
||||
model Company {
|
||||
id String @id @default(cuid())
|
||||
name String @db.Text
|
||||
slug String @unique
|
||||
description String? @db.Text
|
||||
logoUrl String?
|
||||
website String?
|
||||
// The higher the value of the ranking, the higher it appears in the search results.
|
||||
ranking Int? @default(0)
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
|
||||
questionsQuestionEncounter QuestionsQuestionEncounter[]
|
||||
OffersExperience OffersExperience[]
|
||||
OffersOffer OffersOffer[]
|
||||
}
|
||||
|
||||
model Country {
|
||||
id String @id
|
||||
name String @unique
|
||||
code String @unique
|
||||
// The higher the value of the ranking, the higher it appears in the search results.
|
||||
ranking Int? @default(0)
|
||||
states State[]
|
||||
questionsQuestionEncounters QuestionsQuestionEncounter[]
|
||||
ResumesResume ResumesResume[]
|
||||
}
|
||||
|
||||
model State {
|
||||
id String @id
|
||||
name String
|
||||
countryId String
|
||||
cities City[]
|
||||
country Country @relation(fields: [countryId], references: [id])
|
||||
questionsQuestionEncounters QuestionsQuestionEncounter[]
|
||||
|
||||
@@unique([name, countryId])
|
||||
}
|
||||
|
||||
model City {
|
||||
id String @id
|
||||
name String
|
||||
stateId String
|
||||
// The higher the value of the ranking, the higher it appears in the search results.
|
||||
ranking Int? @default(0)
|
||||
state State @relation(fields: [stateId], references: [id])
|
||||
questionsQuestionEncounters QuestionsQuestionEncounter[]
|
||||
OffersExperience OffersExperience[]
|
||||
OffersOffer OffersOffer[]
|
||||
|
||||
@@unique([name, stateId])
|
||||
}
|
||||
|
||||
// Start of Resumes project models.
|
||||
// Add Resumes project models here, prefix all models with "Resumes",
|
||||
// use camelCase for field names, and try to name them consistently
|
||||
// across all models in this file.
|
||||
model ResumesResume {
|
||||
id String @id @default(cuid())
|
||||
userId String
|
||||
title String @db.Text
|
||||
role String @db.Text
|
||||
experience String @db.Text
|
||||
locationId String
|
||||
url String
|
||||
additionalInfo String? @db.Text
|
||||
isResolved Boolean @default(false)
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
user User @relation(fields: [userId], references: [id], onDelete: Cascade)
|
||||
location Country @relation(fields: [locationId], references: [id], onDelete: Cascade)
|
||||
stars ResumesStar[]
|
||||
comments ResumesComment[]
|
||||
}
|
||||
|
||||
model ResumesStar {
|
||||
id String @id @default(cuid())
|
||||
userId String
|
||||
resumeId String
|
||||
createdAt DateTime @default(now())
|
||||
resume ResumesResume @relation(fields: [resumeId], references: [id], onDelete: Cascade)
|
||||
user User @relation(fields: [userId], references: [id], onDelete: Cascade)
|
||||
|
||||
@@unique([userId, resumeId])
|
||||
}
|
||||
|
||||
model ResumesComment {
|
||||
id String @id @default(cuid())
|
||||
userId String
|
||||
resumeId String
|
||||
parentId String?
|
||||
description String @db.Text
|
||||
section ResumesSection
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
resume ResumesResume @relation(fields: [resumeId], references: [id], onDelete: Cascade)
|
||||
votes ResumesCommentVote[]
|
||||
user User @relation(fields: [userId], references: [id], onDelete: Cascade)
|
||||
parent ResumesComment? @relation("parentComment", fields: [parentId], references: [id], onDelete: Cascade)
|
||||
children ResumesComment[] @relation("parentComment")
|
||||
}
|
||||
|
||||
enum ResumesSection {
|
||||
GENERAL
|
||||
EDUCATION
|
||||
EXPERIENCE
|
||||
PROJECTS
|
||||
SKILLS
|
||||
}
|
||||
|
||||
model ResumesCommentVote {
|
||||
id String @id @default(cuid())
|
||||
userId String
|
||||
commentId String
|
||||
value Vote
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
comment ResumesComment @relation(fields: [commentId], references: [id], onDelete: Cascade)
|
||||
user User @relation(fields: [userId], references: [id], onDelete: Cascade)
|
||||
|
||||
@@unique([userId, commentId])
|
||||
}
|
||||
|
||||
// End of Resumes project models.
|
||||
|
||||
// Start of Offers project models.
|
||||
// Add Offers project models here, prefix all models with "Offer",
|
||||
// use camelCase for field names, and try to name them consistently
|
||||
// across all models in this file.
|
||||
|
||||
model OffersProfile {
|
||||
id String @id @default(cuid())
|
||||
profileName String @unique
|
||||
createdAt DateTime @default(now())
|
||||
|
||||
background OffersBackground?
|
||||
|
||||
editToken String
|
||||
|
||||
discussion OffersReply[]
|
||||
|
||||
offers OffersOffer[]
|
||||
|
||||
users User[]
|
||||
|
||||
analysis OffersAnalysis?
|
||||
}
|
||||
|
||||
model OffersAdmin {
|
||||
id String @id @default(cuid())
|
||||
userId String @unique
|
||||
user User @relation(fields: [userId], references: [id], onDelete: Cascade)
|
||||
}
|
||||
|
||||
model OffersBackground {
|
||||
id String @id @default(cuid())
|
||||
|
||||
totalYoe Int @default(0)
|
||||
specificYoes OffersSpecificYoe[]
|
||||
|
||||
experiences OffersExperience[]
|
||||
|
||||
educations OffersEducation[]
|
||||
|
||||
profile OffersProfile @relation(fields: [offersProfileId], references: [id], onDelete: Cascade)
|
||||
offersProfileId String @unique
|
||||
}
|
||||
|
||||
model OffersSpecificYoe {
|
||||
id String @id @default(cuid())
|
||||
|
||||
yoe Int
|
||||
domain String
|
||||
|
||||
background OffersBackground @relation(fields: [backgroundId], references: [id], onDelete: Cascade)
|
||||
backgroundId String
|
||||
}
|
||||
|
||||
model OffersExperience {
|
||||
id String @id @default(cuid())
|
||||
|
||||
company Company? @relation(fields: [companyId], references: [id])
|
||||
companyId String?
|
||||
|
||||
jobType JobType?
|
||||
title String?
|
||||
|
||||
// Add more fields
|
||||
durationInMonths Int?
|
||||
location City? @relation(fields: [cityId], references: [id])
|
||||
cityId String?
|
||||
|
||||
// FULLTIME fields
|
||||
level String?
|
||||
totalCompensation OffersCurrency? @relation("ExperienceTotalCompensation", fields: [totalCompensationId], references: [id])
|
||||
totalCompensationId String? @unique
|
||||
|
||||
// INTERN fields
|
||||
monthlySalary OffersCurrency? @relation("ExperienceMonthlySalary", fields: [monthlySalaryId], references: [id])
|
||||
monthlySalaryId String? @unique
|
||||
|
||||
background OffersBackground @relation(fields: [backgroundId], references: [id], onDelete: Cascade)
|
||||
backgroundId String
|
||||
}
|
||||
|
||||
model OffersCurrency {
|
||||
id String @id @default(cuid())
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
|
||||
value Float
|
||||
currency String
|
||||
|
||||
baseValue Float
|
||||
baseCurrency String @default("USD")
|
||||
|
||||
// Experience
|
||||
OffersExperienceTotalCompensation OffersExperience? @relation("ExperienceTotalCompensation")
|
||||
OffersExperienceMonthlySalary OffersExperience? @relation("ExperienceMonthlySalary")
|
||||
|
||||
// Full Time
|
||||
OffersTotalCompensation OffersFullTime? @relation("OfferTotalCompensation")
|
||||
OffersBaseSalary OffersFullTime? @relation("OfferBaseSalary")
|
||||
OffersBonus OffersFullTime? @relation("OfferBonus")
|
||||
OffersStocks OffersFullTime? @relation("OfferStocks")
|
||||
|
||||
// Intern
|
||||
OffersMonthlySalary OffersIntern?
|
||||
}
|
||||
|
||||
enum JobType {
|
||||
INTERN
|
||||
FULLTIME
|
||||
}
|
||||
|
||||
model OffersEducation {
|
||||
id String @id @default(cuid())
|
||||
type String?
|
||||
field String?
|
||||
|
||||
school String?
|
||||
startDate DateTime?
|
||||
endDate DateTime?
|
||||
|
||||
background OffersBackground @relation(fields: [backgroundId], references: [id], onDelete: Cascade)
|
||||
backgroundId String
|
||||
}
|
||||
|
||||
model OffersReply {
|
||||
id String @id @default(cuid())
|
||||
createdAt DateTime @default(now())
|
||||
message String
|
||||
|
||||
replyingToId String?
|
||||
replyingTo OffersReply? @relation("ReplyThread", fields: [replyingToId], references: [id])
|
||||
replies OffersReply[] @relation("ReplyThread")
|
||||
|
||||
profile OffersProfile @relation(fields: [profileId], references: [id], onDelete: Cascade)
|
||||
profileId String
|
||||
|
||||
user User? @relation(fields: [userId], references: [id])
|
||||
userId String?
|
||||
}
|
||||
|
||||
model OffersOffer {
|
||||
id String @id @default(cuid())
|
||||
|
||||
profile OffersProfile @relation(fields: [profileId], references: [id], onDelete: Cascade)
|
||||
profileId String
|
||||
|
||||
company Company @relation(fields: [companyId], references: [id])
|
||||
companyId String
|
||||
|
||||
location City @relation(fields: [cityId], references: [id])
|
||||
cityId String
|
||||
monthYearReceived DateTime
|
||||
negotiationStrategy String
|
||||
comments String
|
||||
|
||||
jobType JobType
|
||||
|
||||
offersIntern OffersIntern? @relation(fields: [offersInternId], references: [id], onDelete: Cascade)
|
||||
offersInternId String? @unique
|
||||
|
||||
offersFullTime OffersFullTime? @relation(fields: [offersFullTimeId], references: [id], onDelete: Cascade)
|
||||
offersFullTimeId String? @unique
|
||||
|
||||
offersAnalysis OffersAnalysis? @relation("HighestOverallOffer")
|
||||
offersAnalysisUnit OffersAnalysisUnit[]
|
||||
OffersAnalysisUnit OffersAnalysisUnit[] @relation("Analysed Offer")
|
||||
}
|
||||
|
||||
model OffersIntern {
|
||||
id String @id @default(cuid())
|
||||
|
||||
title String
|
||||
internshipCycle String
|
||||
startYear Int
|
||||
monthlySalary OffersCurrency @relation(fields: [monthlySalaryId], references: [id], onDelete: Cascade)
|
||||
monthlySalaryId String @unique
|
||||
|
||||
OffersOffer OffersOffer?
|
||||
}
|
||||
|
||||
model OffersFullTime {
|
||||
id String @id @default(cuid())
|
||||
title String
|
||||
level String
|
||||
totalCompensation OffersCurrency @relation("OfferTotalCompensation", fields: [totalCompensationId], references: [id], onDelete: Cascade)
|
||||
totalCompensationId String @unique
|
||||
baseSalary OffersCurrency? @relation("OfferBaseSalary", fields: [baseSalaryId], references: [id], onDelete: Cascade)
|
||||
baseSalaryId String? @unique
|
||||
bonus OffersCurrency? @relation("OfferBonus", fields: [bonusId], references: [id], onDelete: Cascade)
|
||||
bonusId String? @unique
|
||||
stocks OffersCurrency? @relation("OfferStocks", fields: [stocksId], references: [id], onDelete: Cascade)
|
||||
stocksId String? @unique
|
||||
|
||||
OffersOffer OffersOffer?
|
||||
}
|
||||
|
||||
model OffersAnalysis {
|
||||
id String @id @default(cuid())
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
|
||||
profile OffersProfile @relation(fields: [profileId], references: [id], onDelete: Cascade)
|
||||
profileId String @unique
|
||||
|
||||
overallHighestOffer OffersOffer @relation("HighestOverallOffer", fields: [offerId], references: [id], onDelete: Cascade)
|
||||
offerId String @unique
|
||||
|
||||
// OVERALL
|
||||
overallAnalysis OffersAnalysisUnit @relation("OverallAnalysis", fields: [overallAnalysisUnitId], references: [id], onDelete: Cascade)
|
||||
overallAnalysisUnitId String
|
||||
|
||||
companyAnalysis OffersAnalysisUnit[] @relation("CompanyAnalysis")
|
||||
}
|
||||
|
||||
model OffersAnalysisUnit {
|
||||
id String @id @default(cuid())
|
||||
|
||||
analysedOffer OffersOffer @relation("Analysed Offer", fields: [analysedOfferId], references: [id], onDelete: Cascade)
|
||||
analysedOfferId String
|
||||
|
||||
percentile Float
|
||||
noOfSimilarOffers Int
|
||||
topSimilarOffers OffersOffer[]
|
||||
|
||||
offersAnalysisOverall OffersAnalysis[] @relation("OverallAnalysis")
|
||||
offersAnalysisCompany OffersAnalysis[] @relation("CompanyAnalysis")
|
||||
}
|
||||
|
||||
// End of Offers project models.
|
||||
|
||||
// Start of Questions project models.
|
||||
// Add Questions project models here, prefix all models with "Questions",
|
||||
// use camelCase for field names, and try to name them consistently
|
||||
// across all models in this file.
|
||||
|
||||
enum QuestionsQuestionType {
|
||||
CODING
|
||||
SYSTEM_DESIGN
|
||||
BEHAVIORAL
|
||||
THEORY
|
||||
}
|
||||
|
||||
model QuestionsQuestion {
|
||||
id String @id @default(cuid())
|
||||
userId String?
|
||||
content String @db.Text
|
||||
questionType QuestionsQuestionType
|
||||
lastSeenAt DateTime?
|
||||
upvotes Int @default(0)
|
||||
numEncounters Int @default(0)
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
|
||||
user User? @relation(fields: [userId], references: [id], onDelete: SetNull)
|
||||
encounters QuestionsQuestionEncounter[]
|
||||
votes QuestionsQuestionVote[]
|
||||
comments QuestionsQuestionComment[]
|
||||
answers QuestionsAnswer[]
|
||||
questionsListQuestionEntries QuestionsListQuestionEntry[]
|
||||
|
||||
@@index([lastSeenAt, id])
|
||||
@@index([numEncounters, id])
|
||||
@@index([upvotes, id])
|
||||
}
|
||||
|
||||
model QuestionsQuestionEncounter {
|
||||
id String @id @default(cuid())
|
||||
questionId String
|
||||
userId String?
|
||||
companyId String?
|
||||
countryId String?
|
||||
stateId String?
|
||||
cityId String?
|
||||
role String @db.Text
|
||||
seenAt DateTime
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
|
||||
country Country? @relation(fields: [countryId], references: [id], onDelete: SetNull)
|
||||
state State? @relation(fields: [stateId], references: [id], onDelete: SetNull)
|
||||
city City? @relation(fields: [cityId], references: [id], onDelete: SetNull)
|
||||
company Company? @relation(fields: [companyId], references: [id], onDelete: SetNull)
|
||||
user User? @relation(fields: [userId], references: [id], onDelete: SetNull)
|
||||
question QuestionsQuestion @relation(fields: [questionId], references: [id], onDelete: Cascade)
|
||||
}
|
||||
|
||||
model QuestionsQuestionVote {
|
||||
id String @id @default(cuid())
|
||||
questionId String
|
||||
userId String?
|
||||
vote Vote
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
|
||||
user User? @relation(fields: [userId], references: [id], onDelete: SetNull)
|
||||
question QuestionsQuestion @relation(fields: [questionId], references: [id], onDelete: Cascade)
|
||||
|
||||
@@unique([questionId, userId])
|
||||
}
|
||||
|
||||
model QuestionsQuestionComment {
|
||||
id String @id @default(cuid())
|
||||
questionId String
|
||||
userId String?
|
||||
upvotes Int @default(0)
|
||||
content String @db.Text
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
|
||||
user User? @relation(fields: [userId], references: [id], onDelete: SetNull)
|
||||
question QuestionsQuestion @relation(fields: [questionId], references: [id], onDelete: Cascade)
|
||||
votes QuestionsQuestionCommentVote[]
|
||||
|
||||
@@index([updatedAt, id])
|
||||
@@index([upvotes, id])
|
||||
}
|
||||
|
||||
model QuestionsQuestionCommentVote {
|
||||
id String @id @default(cuid())
|
||||
questionCommentId String
|
||||
userId String?
|
||||
vote Vote
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
|
||||
user User? @relation(fields: [userId], references: [id], onDelete: SetNull)
|
||||
comment QuestionsQuestionComment @relation(fields: [questionCommentId], references: [id], onDelete: Cascade)
|
||||
|
||||
@@unique([questionCommentId, userId])
|
||||
}
|
||||
|
||||
model QuestionsAnswer {
|
||||
id String @id @default(cuid())
|
||||
questionId String
|
||||
userId String?
|
||||
content String @db.Text
|
||||
upvotes Int @default(0)
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
|
||||
user User? @relation(fields: [userId], references: [id], onDelete: SetNull)
|
||||
question QuestionsQuestion @relation(fields: [questionId], references: [id], onDelete: Cascade)
|
||||
votes QuestionsAnswerVote[]
|
||||
comments QuestionsAnswerComment[]
|
||||
|
||||
@@index([updatedAt, id])
|
||||
@@index([upvotes, id])
|
||||
}
|
||||
|
||||
model QuestionsAnswerVote {
|
||||
id String @id @default(cuid())
|
||||
answerId String
|
||||
userId String?
|
||||
vote Vote
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
|
||||
user User? @relation(fields: [userId], references: [id], onDelete: SetNull)
|
||||
answer QuestionsAnswer @relation(fields: [answerId], references: [id], onDelete: Cascade)
|
||||
|
||||
@@unique([answerId, userId])
|
||||
}
|
||||
|
||||
model QuestionsAnswerComment {
|
||||
id String @id @default(cuid())
|
||||
answerId String
|
||||
userId String?
|
||||
content String @db.Text
|
||||
upvotes Int @default(0)
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
|
||||
user User? @relation(fields: [userId], references: [id], onDelete: SetNull)
|
||||
answer QuestionsAnswer @relation(fields: [answerId], references: [id], onDelete: Cascade)
|
||||
votes QuestionsAnswerCommentVote[]
|
||||
|
||||
@@index([updatedAt, id])
|
||||
@@index([upvotes, id])
|
||||
}
|
||||
|
||||
model QuestionsAnswerCommentVote {
|
||||
id String @id @default(cuid())
|
||||
answerCommentId String
|
||||
userId String?
|
||||
vote Vote
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
|
||||
user User? @relation(fields: [userId], references: [id], onDelete: SetNull)
|
||||
comment QuestionsAnswerComment @relation(fields: [answerCommentId], references: [id], onDelete: Cascade)
|
||||
|
||||
@@unique([answerCommentId, userId])
|
||||
}
|
||||
|
||||
model QuestionsList {
|
||||
id String @id @default(cuid())
|
||||
userId String
|
||||
name String @db.VarChar(256)
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
|
||||
user User @relation(fields: [userId], references: [id], onDelete: Cascade)
|
||||
questionEntries QuestionsListQuestionEntry[]
|
||||
|
||||
@@unique([userId, name])
|
||||
}
|
||||
|
||||
model QuestionsListQuestionEntry {
|
||||
id String @id @default(cuid())
|
||||
listId String
|
||||
questionId String
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
|
||||
list QuestionsList @relation(fields: [listId], references: [id], onDelete: Cascade)
|
||||
question QuestionsQuestion @relation(fields: [questionId], references: [id], onDelete: Cascade)
|
||||
|
||||
@@unique([listId, questionId])
|
||||
}
|
||||
|
||||
// End of Questions project models.
|
|
@ -0,0 +1,49 @@
|
|||
import { PrismaClient } from '@prisma/client';
|
||||
import { generateAnalysis } from '../src/utils/offers/analysis/analysisGeneration';
|
||||
|
||||
const prisma = new PrismaClient();
|
||||
|
||||
const seedAnalysis = async () => {
|
||||
console.log('Busy crunching analysis.....');
|
||||
|
||||
const profilesWithoutAnalysis = await prisma.offersProfile.findMany({
|
||||
where: {
|
||||
analysis: {
|
||||
is: null,
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
console.log(
|
||||
'Number of profiles found without analysis:',
|
||||
profilesWithoutAnalysis.length,
|
||||
);
|
||||
|
||||
let i = 0;
|
||||
|
||||
while (i < profilesWithoutAnalysis.length) {
|
||||
const profile = profilesWithoutAnalysis[i];
|
||||
|
||||
await generateAnalysis({
|
||||
ctx: { prisma, session: null },
|
||||
input: { profileId: profile.id },
|
||||
});
|
||||
|
||||
console.log(++i, ': Analysis generated for profile with id', profile.id);
|
||||
}
|
||||
|
||||
console.log(i, 'analysis generated');
|
||||
};
|
||||
|
||||
Promise.all([seedAnalysis()])
|
||||
.then(async () => {
|
||||
await prisma.$disconnect();
|
||||
})
|
||||
.catch(async (e) => {
|
||||
console.error(e);
|
||||
console.log('Analysis stopping!');
|
||||
await prisma.$disconnect();
|
||||
process.exit(1);
|
||||
});
|
||||
|
||||
export {};
|
|
@ -0,0 +1,37 @@
|
|||
import * as fs from 'fs';
|
||||
const { PrismaClient } = require('@prisma/client');
|
||||
const { parse } = require('csv-parse/sync');
|
||||
|
||||
const prisma = new PrismaClient();
|
||||
|
||||
async function main() {
|
||||
console.log('Seeding started...');
|
||||
|
||||
const file = fs.readFileSync('prisma/companies.csv');
|
||||
const companies = parse(file, {
|
||||
columns: true,
|
||||
skip_empty_lines: true,
|
||||
});
|
||||
|
||||
console.info('Seeding companies');
|
||||
await prisma.company.createMany({
|
||||
data: companies.map((company) => ({
|
||||
name: company.name,
|
||||
slug: company.slug,
|
||||
description: !!company.description ? company.description : undefined,
|
||||
website: company.website,
|
||||
logoUrl: company.logoUrl,
|
||||
})),
|
||||
skipDuplicates: true,
|
||||
});
|
||||
}
|
||||
|
||||
main()
|
||||
.then(async () => {
|
||||
await prisma.$disconnect();
|
||||
})
|
||||
.catch(async (e) => {
|
||||
console.error(e);
|
||||
await prisma.$disconnect();
|
||||
process.exit(1);
|
||||
});
|
|
@ -0,0 +1,217 @@
|
|||
import { PrismaClient } from '@prisma/client';
|
||||
|
||||
import { JobTitleLabels } from '../src/components/shared/JobTitles';
|
||||
|
||||
const prisma = new PrismaClient();
|
||||
|
||||
type QuestionCreateData = Parameters<
|
||||
typeof prisma.questionsQuestion.create
|
||||
>[0]['data'];
|
||||
|
||||
function selectRandomRole() {
|
||||
const roles = Object.keys(JobTitleLabels);
|
||||
const randomIndex = Math.floor(Math.random() * roles.length);
|
||||
return roles[randomIndex];
|
||||
}
|
||||
|
||||
function generateRandomDate() {
|
||||
// Return a date between 2020 and 2022.
|
||||
const start = new Date(2020, 0, 1);
|
||||
const end = new Date(2022, 0, 1);
|
||||
return new Date(
|
||||
start.getTime() + Math.random() * (end.getTime() - start.getTime()),
|
||||
);
|
||||
}
|
||||
|
||||
function generateRandomCodingAnswer() {
|
||||
return CODING_ANSWER_CONTENT[
|
||||
Math.floor(Math.random() * CODING_ANSWER_CONTENT.length)
|
||||
];
|
||||
}
|
||||
|
||||
function generateRandomBehavioralAnswer() {
|
||||
return BEHAVIORAL_ANSWER_CONTENT[
|
||||
Math.floor(Math.random() * BEHAVIORAL_ANSWER_CONTENT.length)
|
||||
];
|
||||
}
|
||||
|
||||
const CODING_QUESTION_CONTENT = [
|
||||
'Given a string, find the length of the longest substring without repeating characters.',
|
||||
'Given an array of integers, return indices of the two numbers such that they add up to a specific target.',
|
||||
'Given a contiguous sequence of numbers in which each number repeats thrice, there is exactly one missing number. Find the missing number.',
|
||||
'Find the contiguous subarray within an array (containing at least one number) which has the largest product.',
|
||||
'Find a contiguous subarray which has the largest sum.',
|
||||
];
|
||||
|
||||
const BEHAVIORAL_QUESTION_CONTENT = [
|
||||
'Tell me about a time you had to work with a difficult person.',
|
||||
'Rate your communication skills on a scale of 1 to 10.',
|
||||
'Are you a team player?',
|
||||
'What is your greatest weakness?',
|
||||
'What is your greatest strength?',
|
||||
'What is your biggest accomplishment?',
|
||||
'What is your biggest failure?',
|
||||
'Be honest, how would your friends describe you?',
|
||||
'How do you handle stress?',
|
||||
'Let’s say you have a deadline to meet. How do you prioritize your work?',
|
||||
];
|
||||
|
||||
const CODING_ANSWER_CONTENT = [
|
||||
'This question is easy. Just use a hash map.',
|
||||
'This question is hard. I have no idea how to solve it.',
|
||||
'This question is medium. I can solve it in 30 minutes.',
|
||||
'Can be done with a simple for loop.',
|
||||
'Simple recursion can solve this.',
|
||||
'Please explain the question again.',
|
||||
'Question is not clear.',
|
||||
'Brute force solution is the best.',
|
||||
];
|
||||
|
||||
const BEHAVIORAL_ANSWER_CONTENT = [
|
||||
'This is a very common question. I have a lot of experience with this.',
|
||||
"I don't think this is a good question to ask. However, I can answer it.",
|
||||
'Most companies ask this question. I think you should ask something else.',
|
||||
'I try to take a step back and assess the situation. I figure out what is the most important thing to do and what can wait. I also try to delegate or ask for help when needed.',
|
||||
'I try to have a discussion with my manager or the person who I feel is not valuing my work. I try to explain how I feel and what I would like to see change.',
|
||||
'I try to have a discussion with the coworker. I try to understand their perspective and see if there is a way to resolve the issue.',
|
||||
];
|
||||
|
||||
const CODING_QUESTIONS: Array<QuestionCreateData> = CODING_QUESTION_CONTENT.map(
|
||||
(content) => ({
|
||||
content,
|
||||
questionType: 'CODING',
|
||||
userId: null,
|
||||
encounters: {
|
||||
create: {
|
||||
role: selectRandomRole(),
|
||||
seenAt: generateRandomDate(),
|
||||
},
|
||||
},
|
||||
}),
|
||||
);
|
||||
|
||||
const BEHAVIORAL_QUESTIONS: Array<QuestionCreateData> =
|
||||
BEHAVIORAL_QUESTION_CONTENT.map((content) => ({
|
||||
content,
|
||||
questionType: 'BEHAVIORAL',
|
||||
userId: null,
|
||||
encounters: {
|
||||
create: {
|
||||
role: selectRandomRole(),
|
||||
seenAt: generateRandomDate(),
|
||||
},
|
||||
},
|
||||
}));
|
||||
|
||||
const QUESTIONS: Array<QuestionCreateData> = [
|
||||
...CODING_QUESTIONS,
|
||||
...BEHAVIORAL_QUESTIONS,
|
||||
];
|
||||
|
||||
async function main() {
|
||||
console.log('Performing preliminary checks...');
|
||||
|
||||
const firstCompany = await prisma.company.findFirst();
|
||||
if (!firstCompany) {
|
||||
throw new Error(
|
||||
'No company found. Please seed db with some companies first.',
|
||||
);
|
||||
}
|
||||
|
||||
const firstCity = await prisma.city.findFirst({
|
||||
include: {
|
||||
state: true,
|
||||
},
|
||||
});
|
||||
if (!firstCity) {
|
||||
throw new Error('No city found. Please seed db with some cities first.');
|
||||
}
|
||||
|
||||
// Generate random answers to the questions
|
||||
const users = await prisma.user.findMany();
|
||||
if (users.length === 0) {
|
||||
throw new Error('No users found. Please seed db with some users first.');
|
||||
}
|
||||
|
||||
console.log('Seeding started...');
|
||||
|
||||
console.log('Creating coding and behavioral questions...');
|
||||
await Promise.all([
|
||||
QUESTIONS.map(async (question) => {
|
||||
await prisma.questionsQuestion.create({
|
||||
data: {
|
||||
...question,
|
||||
encounters: {
|
||||
create: {
|
||||
...question.encounters!.create,
|
||||
companyId: firstCompany.id,
|
||||
stateId: firstCity.stateId,
|
||||
cityId: firstCity.id,
|
||||
countryId: firstCity.state.countryId,
|
||||
} as any,
|
||||
},
|
||||
},
|
||||
});
|
||||
}),
|
||||
]);
|
||||
|
||||
console.log('Creating answers to coding questions...');
|
||||
const codingQuestions = await prisma.questionsQuestion.findMany({
|
||||
where: {
|
||||
questionType: 'CODING',
|
||||
},
|
||||
});
|
||||
await Promise.all(
|
||||
codingQuestions.map(async (question) => {
|
||||
const answers = Array.from(
|
||||
{ length: Math.floor(Math.random() * 5) },
|
||||
() => ({
|
||||
content: generateRandomCodingAnswer(),
|
||||
userId: users[Math.floor(Math.random() * users.length)].id,
|
||||
questionId: question.id,
|
||||
}),
|
||||
);
|
||||
|
||||
await prisma.questionsAnswer.createMany({
|
||||
data: answers,
|
||||
});
|
||||
}),
|
||||
);
|
||||
|
||||
console.log('Creating answers to behavioral questions...');
|
||||
const behavioralQuestions = await prisma.questionsQuestion.findMany({
|
||||
where: {
|
||||
questionType: 'BEHAVIORAL',
|
||||
},
|
||||
});
|
||||
|
||||
await Promise.all(
|
||||
behavioralQuestions.map(async (question) => {
|
||||
const answers = Array.from(
|
||||
{ length: Math.floor(Math.random() * 5) },
|
||||
|
||||
() => ({
|
||||
content: generateRandomBehavioralAnswer(),
|
||||
userId: users[Math.floor(Math.random() * users.length)].id,
|
||||
questionId: question.id,
|
||||
}),
|
||||
);
|
||||
|
||||
await prisma.questionsAnswer.createMany({
|
||||
data: answers,
|
||||
});
|
||||
}),
|
||||
);
|
||||
|
||||
console.log('Seeding completed.');
|
||||
}
|
||||
|
||||
main()
|
||||
.then(async () => {
|
||||
await prisma.$disconnect();
|
||||
})
|
||||
.catch(async (e) => {
|
||||
console.error(e);
|
||||
await prisma.$disconnect();
|
||||
process.exit(1);
|
||||
});
|
|
@ -0,0 +1,359 @@
|
|||
import reader from 'xlsx';
|
||||
import { PrismaClient } from '@prisma/client';
|
||||
import crypto from 'crypto';
|
||||
import { baseCurrencyString } from '../src/utils/offers/currency';
|
||||
import { convert } from '../src/utils/offers/currency/currencyExchange';
|
||||
|
||||
import {
|
||||
generateRandomName,
|
||||
generateRandomStringForToken,
|
||||
} from '../src/utils/offers/randomGenerator';
|
||||
|
||||
const prisma = new PrismaClient();
|
||||
|
||||
// Reading our test file
|
||||
const file = reader.readFile('prisma/salaries.xlsx');
|
||||
|
||||
let data: Array<ExcelData> = [];
|
||||
|
||||
type ExcelData = {
|
||||
Timestamp: Date;
|
||||
Type: string;
|
||||
Company: string;
|
||||
Role: string;
|
||||
Income?: number | string;
|
||||
Stocks?: number | string;
|
||||
SignOn?: number | string;
|
||||
TC?: number | string;
|
||||
Bonus?: number | string;
|
||||
Comments?: string;
|
||||
};
|
||||
|
||||
const sheets = file.SheetNames;
|
||||
|
||||
for (let i = 0; i < 1; i++) {
|
||||
const temp = reader.utils.sheet_to_json(file.Sheets[file.SheetNames[i]]);
|
||||
temp.forEach((res: ExcelData) => {
|
||||
data.push(res);
|
||||
});
|
||||
}
|
||||
|
||||
function xlSerialToJsDate(xlSerial) {
|
||||
return new Date(Date.UTC(0, 0, xlSerial - 1));
|
||||
}
|
||||
|
||||
const getJobTitle = (role: string) => {
|
||||
const processedRole = role.toUpperCase().trim();
|
||||
|
||||
if (processedRole.includes('ML ENGINEER')) {
|
||||
return 'machine-learning-engineer';
|
||||
} else if (processedRole.includes('BACKEND')) {
|
||||
return 'back-end-engineer';
|
||||
} else if (processedRole.includes('DATA')) {
|
||||
return 'data-engineer';
|
||||
} else if (processedRole.includes('DEVOPS')) {
|
||||
return 'devops-engineer';
|
||||
} else if (processedRole.includes('ENTERPRISE')) {
|
||||
return 'enterprise-engineer';
|
||||
} else if (processedRole.includes('RESEARCH')) {
|
||||
return 'research-engineer';
|
||||
} else if (
|
||||
processedRole.includes('CYBER') ||
|
||||
processedRole.includes('SECURITY')
|
||||
) {
|
||||
return 'security-engineer';
|
||||
} else if (processedRole.includes('QA')) {
|
||||
return 'test-engineer';
|
||||
} else if (processedRole.includes('SYSTEM')) {
|
||||
return 'systems-engineer';
|
||||
} else {
|
||||
return 'software-engineer'; // Assume default SWE
|
||||
}
|
||||
};
|
||||
|
||||
const getYoe = (type: string) => {
|
||||
const processedType = type.toUpperCase().trim();
|
||||
|
||||
if (
|
||||
processedType.includes('FRESH GRAD') ||
|
||||
processedType.includes('JUNIOR')
|
||||
) {
|
||||
return Math.floor(Math.random() * 3);
|
||||
} else if (processedType.includes('MID')) {
|
||||
return Math.floor(Math.random() * 3) + 3;
|
||||
} else if (processedType.includes('SENIOR')) {
|
||||
return Math.floor(Math.random() * 5) + 6;
|
||||
} else {
|
||||
return 0; // INTERNSHIP OR ERROR -> 0 YOE
|
||||
}
|
||||
};
|
||||
|
||||
const getLevel = (type: string) => {
|
||||
const processedType = type.toUpperCase().trim();
|
||||
|
||||
if (
|
||||
processedType.includes('FRESH GRAD') ||
|
||||
processedType.includes('JUNIOR')
|
||||
) {
|
||||
return 'Junior';
|
||||
} else if (processedType.includes('MID')) {
|
||||
return 'Mid';
|
||||
} else if (processedType.includes('SENIOR')) {
|
||||
return 'Senior';
|
||||
} else {
|
||||
return 'N/A';
|
||||
}
|
||||
};
|
||||
|
||||
const createdProfileIds: Array<string> = [];
|
||||
|
||||
const seedSalaries = async () => {
|
||||
console.log('Seeding from salaries sheet...');
|
||||
|
||||
const companyIdMappings = {};
|
||||
(await prisma.company.findMany()).forEach((company) => {
|
||||
companyIdMappings[company.slug] = company.id;
|
||||
});
|
||||
|
||||
// get countryId of Singapore
|
||||
const singapore = await prisma.city.findFirst({
|
||||
where: {
|
||||
name: 'Singapore',
|
||||
},
|
||||
});
|
||||
|
||||
console.log('Singapore ID: ' + singapore?.id);
|
||||
// break;
|
||||
// seed here
|
||||
|
||||
if (singapore) {
|
||||
return await Promise.all(
|
||||
data.map(async (data: ExcelData) => {
|
||||
if (data.TC && typeof data.TC === 'number') {
|
||||
// Generate random name until unique
|
||||
let uniqueName: string = await generateRandomName();
|
||||
|
||||
const jobTitle = getJobTitle(data.Role);
|
||||
const yoe = getYoe(data.Type);
|
||||
const level = getLevel(data.Type);
|
||||
|
||||
// check if we have company id
|
||||
if (companyIdMappings[data.Company]) {
|
||||
const token = crypto
|
||||
.createHash('sha256')
|
||||
.update(
|
||||
xlSerialToJsDate(data.Timestamp).toString() +
|
||||
generateRandomStringForToken(),
|
||||
)
|
||||
.digest('hex');
|
||||
|
||||
if (data.Type.toUpperCase() === 'INTERNSHIP') {
|
||||
// create profile
|
||||
const dataAdded = await prisma.offersProfile.create({
|
||||
data: {
|
||||
profileName: uniqueName,
|
||||
createdAt: xlSerialToJsDate(data.Timestamp),
|
||||
editToken: token,
|
||||
background: {
|
||||
create: {
|
||||
totalYoe: yoe,
|
||||
},
|
||||
},
|
||||
offers: {
|
||||
create: {
|
||||
comments: data.Comments ?? '',
|
||||
company: {
|
||||
connect: {
|
||||
id: companyIdMappings[data.Company],
|
||||
},
|
||||
},
|
||||
jobType: 'INTERN',
|
||||
location: {
|
||||
connect: {
|
||||
id: singapore.id,
|
||||
},
|
||||
}, // TODO: DEFAULT AS SG
|
||||
monthYearReceived: xlSerialToJsDate(data.Timestamp),
|
||||
negotiationStrategy: '',
|
||||
offersIntern: {
|
||||
create: {
|
||||
internshipCycle: 'summer',
|
||||
monthlySalary: {
|
||||
create: {
|
||||
baseCurrency: baseCurrencyString,
|
||||
baseValue: await convert(
|
||||
data.Income
|
||||
? typeof data.Income === 'number'
|
||||
? data.Income
|
||||
: 0
|
||||
: 0,
|
||||
'SGD', // assume sgd
|
||||
baseCurrencyString,
|
||||
),
|
||||
currency: 'SGD', // assume sgd
|
||||
value: data.Income
|
||||
? typeof data.Income === 'number'
|
||||
? data.Income
|
||||
: 0
|
||||
: 0,
|
||||
},
|
||||
},
|
||||
startYear: xlSerialToJsDate(
|
||||
data.Timestamp,
|
||||
).getFullYear(),
|
||||
title: jobTitle,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
console.log('Profile created:', dataAdded.id);
|
||||
createdProfileIds.push(dataAdded.id);
|
||||
} else {
|
||||
// assume rest full time
|
||||
const dataAdded = await prisma.offersProfile.create({
|
||||
data: {
|
||||
profileName: uniqueName,
|
||||
createdAt: xlSerialToJsDate(data.Timestamp),
|
||||
editToken: token,
|
||||
background: {
|
||||
create: {
|
||||
totalYoe: yoe,
|
||||
},
|
||||
},
|
||||
offers: {
|
||||
create: {
|
||||
comments: data.Comments ?? '',
|
||||
company: {
|
||||
connect: {
|
||||
id: companyIdMappings[data.Company],
|
||||
},
|
||||
},
|
||||
jobType: 'FULLTIME',
|
||||
location: {
|
||||
connect: {
|
||||
id: singapore.id,
|
||||
},
|
||||
}, // TODO: DEFAULT AS SG
|
||||
monthYearReceived: xlSerialToJsDate(data.Timestamp),
|
||||
negotiationStrategy: '',
|
||||
offersFullTime: {
|
||||
create: {
|
||||
baseSalary: {
|
||||
create: {
|
||||
baseCurrency: baseCurrencyString,
|
||||
baseValue: await convert(
|
||||
data.Income
|
||||
? typeof data.Income === 'number'
|
||||
? data.Income
|
||||
: 0
|
||||
: 0,
|
||||
'SGD', // assume sgd
|
||||
baseCurrencyString,
|
||||
),
|
||||
currency: 'SGD', // assume sgd
|
||||
value: data.Income
|
||||
? typeof data.Income === 'number'
|
||||
? data.Income
|
||||
: 0
|
||||
: 0,
|
||||
},
|
||||
},
|
||||
bonus: {
|
||||
create: {
|
||||
baseCurrency: baseCurrencyString,
|
||||
baseValue: await convert(
|
||||
data.Bonus
|
||||
? typeof data.Bonus === 'number'
|
||||
? data.Bonus
|
||||
: 0
|
||||
: 0,
|
||||
'SGD',
|
||||
baseCurrencyString,
|
||||
),
|
||||
currency: 'SGD',
|
||||
value: data.Bonus
|
||||
? typeof data.Bonus === 'number'
|
||||
? data.Bonus
|
||||
: 0
|
||||
: 0,
|
||||
},
|
||||
},
|
||||
level: level,
|
||||
stocks: {
|
||||
create: {
|
||||
baseCurrency: baseCurrencyString,
|
||||
baseValue: await convert(
|
||||
data.Stocks
|
||||
? typeof data.Stocks === 'number'
|
||||
? data.Stocks
|
||||
: 0
|
||||
: 0,
|
||||
'SGD',
|
||||
baseCurrencyString,
|
||||
),
|
||||
currency: 'SGD',
|
||||
value: data.Stocks
|
||||
? typeof data.Stocks === 'number'
|
||||
? data.Stocks
|
||||
: 0
|
||||
: 0,
|
||||
},
|
||||
},
|
||||
title: jobTitle,
|
||||
totalCompensation: {
|
||||
create: {
|
||||
baseCurrency: baseCurrencyString,
|
||||
baseValue: await convert(
|
||||
data.TC
|
||||
? typeof data.TC === 'number'
|
||||
? data.TC
|
||||
: 0
|
||||
: 0,
|
||||
'SGD',
|
||||
baseCurrencyString,
|
||||
),
|
||||
currency: 'SGD',
|
||||
value: data.TC
|
||||
? typeof data.TC === 'number'
|
||||
? data.TC
|
||||
: 0
|
||||
: 0,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
});
|
||||
console.log('Profile created:', dataAdded.id);
|
||||
createdProfileIds.push(dataAdded.id);
|
||||
}
|
||||
} else {
|
||||
console.log('Invalid Company: ' + data.Company);
|
||||
}
|
||||
} else {
|
||||
console.log('Invalid TC not a number: ' + data.TC);
|
||||
}
|
||||
}),
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
Promise.all([seedSalaries()])
|
||||
.then(() => {
|
||||
console.log(createdProfileIds.length + ' profiles created');
|
||||
})
|
||||
.then(async () => {
|
||||
await prisma.$disconnect();
|
||||
})
|
||||
.catch(async (e) => {
|
||||
console.error(e);
|
||||
await prisma.$disconnect();
|
||||
process.exit(1);
|
||||
});
|
||||
|
||||
export {};
|
|
@ -0,0 +1,53 @@
|
|||
const { PrismaClient } = require('@prisma/client');
|
||||
|
||||
const cities = require('./data/cities.json');
|
||||
const countries = require('./data/countries.json');
|
||||
const states = require('./data/states.json');
|
||||
|
||||
const prisma = new PrismaClient();
|
||||
|
||||
async function main() {
|
||||
console.log('Seeding started...');
|
||||
|
||||
console.info('Seeding countries');
|
||||
await prisma.country.createMany({
|
||||
data: countries.data.map((country) => ({
|
||||
id: country.country_id,
|
||||
code: country.sortname,
|
||||
name: country.country_name,
|
||||
})),
|
||||
skipDuplicates: true,
|
||||
});
|
||||
|
||||
console.info('Seeding states');
|
||||
await prisma.state.createMany({
|
||||
data: states.data.map((state) => ({
|
||||
id: state.state_id,
|
||||
countryId: state.country_id,
|
||||
name: state.state_name,
|
||||
})),
|
||||
skipDuplicates: true,
|
||||
});
|
||||
|
||||
console.info('Seeding cities');
|
||||
await prisma.city.createMany({
|
||||
data: cities.data.map((city) => ({
|
||||
id: city.city_id,
|
||||
stateId: city.state_id,
|
||||
name: city.city_name,
|
||||
})),
|
||||
skipDuplicates: true,
|
||||
});
|
||||
|
||||
console.log('Seeding completed.');
|
||||
}
|
||||
|
||||
main()
|
||||
.then(async () => {
|
||||
await prisma.$disconnect();
|
||||
})
|
||||
.catch(async (e) => {
|
||||
console.error(e);
|
||||
await prisma.$disconnect();
|
||||
process.exit(1);
|
||||
});
|
Before Width: | Height: | Size: 9.6 KiB After Width: | Height: | Size: 9.6 KiB |
Before Width: | Height: | Size: 4.8 KiB After Width: | Height: | Size: 4.8 KiB |
After Width: | Height: | Size: 351 KiB |
|
@ -0,0 +1,67 @@
|
|||
<svg width="421" height="333" viewBox="0 0 421 333" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<ellipse cx="197.5" cy="292" rx="197.5" ry="41" fill="#EFF2F5"/>
|
||||
<path d="M328 252.5C328 288.122 269.573 317 197.5 317C125.427 317 67 288.122 67 252.5C67 216.878 125.427 188 197.5 188C269.573 188 328 216.878 328 252.5Z" fill="#D29403"/>
|
||||
<path d="M328 252.5C328 288.122 269.573 317 197.5 317C125.427 317 67 288.122 67 252.5C67 216.878 125.427 188 197.5 188C269.573 188 328 216.878 328 252.5Z" fill="#D29403"/>
|
||||
<path d="M67 227C67 221.477 71.4772 217 77 217H318C323.523 217 328 221.477 328 227V253H67V227Z" fill="#D29403"/>
|
||||
<path d="M328.257 205.316C328.257 240.857 269.825 269.669 197.745 269.669C125.666 269.669 67.2334 240.857 67.2334 205.316C67.2334 169.775 125.666 140.963 197.745 140.963C269.825 140.963 328.257 169.775 328.257 205.316Z" fill="white"/>
|
||||
<path d="M328.257 205.316C328.257 240.857 269.825 269.669 197.745 269.669C125.666 269.669 67.2334 240.857 67.2334 205.316C67.2334 169.775 125.666 140.963 197.745 140.963C269.825 140.963 328.257 169.775 328.257 205.316Z" fill="white"/>
|
||||
<path d="M255 292.5C255 297.747 251.194 302 246.5 302C241.806 302 238 297.747 238 292.5C238 287.254 241.806 283 246.5 283C251.194 283 255 287.254 255 292.5Z" fill="#A47811"/>
|
||||
<path d="M290 280.5C290 285.747 286.194 290 281.5 290C276.806 290 273 285.747 273 280.5C273 275.254 276.806 271 281.5 271C286.194 271 290 275.254 290 280.5Z" fill="#A47811"/>
|
||||
<path d="M317 263.5C317 268.747 313.418 273 309 273C304.582 273 301 268.747 301 263.5C301 258.254 304.582 254 309 254C313.418 254 317 258.254 317 263.5Z" fill="#A47811"/>
|
||||
<path d="M328 208.5C328 244.122 269.573 273 197.5 273C125.427 273 67 244.122 67 208.5C67 172.878 125.427 144 197.5 144C269.573 144 328 172.878 328 208.5Z" fill="#E8A301"/>
|
||||
<path d="M328 208.5C328 244.122 269.573 273 197.5 273C125.427 273 67 244.122 67 208.5C67 172.878 125.427 144 197.5 144C269.573 144 328 172.878 328 208.5Z" fill="#E8A301"/>
|
||||
<path d="M67 183C67 177.477 71.4772 173 77 173H318C323.523 173 328 177.477 328 183V207H67V183Z" fill="#E8A301"/>
|
||||
<path d="M328.257 155.328C328.257 190.869 269.825 219.681 197.745 219.681C125.666 219.681 67.2334 190.869 67.2334 155.328C67.2334 119.787 125.666 90.9756 197.745 90.9756C269.825 90.9756 328.257 119.787 328.257 155.328Z" fill="white"/>
|
||||
<path d="M328.257 155.328C328.257 190.869 269.825 219.681 197.745 219.681C125.666 219.681 67.2334 190.869 67.2334 155.328C67.2334 119.787 125.666 90.9756 197.745 90.9756C269.825 90.9756 328.257 119.787 328.257 155.328Z" fill="white"/>
|
||||
<path d="M328.257 164.328C328.257 199.869 269.825 228.681 197.745 228.681C125.666 228.681 67.2334 199.869 67.2334 164.328C67.2334 128.787 125.666 99.9756 197.745 99.9756C269.825 99.9756 328.257 128.787 328.257 164.328Z" fill="#FEB915"/>
|
||||
<path d="M328.257 164.328C328.257 199.869 269.825 228.681 197.745 228.681C125.666 228.681 67.2334 199.869 67.2334 164.328C67.2334 128.787 125.666 99.9756 197.745 99.9756C269.825 99.9756 328.257 128.787 328.257 164.328Z" fill="#FEB915"/>
|
||||
<path d="M67.2334 128.577H328.257V163.307H67.2334V128.577Z" fill="#FEB915"/>
|
||||
<rect x="83" y="157" width="8" height="39" rx="4" fill="#D29403"/>
|
||||
<rect x="108" y="171" width="8" height="41" rx="4" fill="#D29403"/>
|
||||
<rect x="135" y="180" width="8" height="41" rx="4" fill="#D29403"/>
|
||||
<path d="M328.257 122.384C328.257 157.925 269.825 186.736 197.745 186.736C125.665 186.736 67.2334 157.925 67.2334 122.384C67.2334 86.8425 125.665 58.0308 197.745 58.0308C269.825 58.0308 328.257 86.8425 328.257 122.384Z" fill="url(#paint0_linear_464_451)"/>
|
||||
<path d="M328.257 122.384C328.257 157.925 269.825 186.736 197.745 186.736C125.665 186.736 67.2334 157.925 67.2334 122.384C67.2334 86.8425 125.665 58.0308 197.745 58.0308C269.825 58.0308 328.257 86.8425 328.257 122.384Z" fill="url(#paint1_linear_464_451)"/>
|
||||
<path d="M310.937 121.362C310.937 127.927 307.956 134.293 302.337 140.209C296.71 146.133 288.497 151.536 278.235 156.106C257.713 165.245 229.257 170.936 197.745 170.936C166.234 170.936 137.778 165.245 117.256 156.106C106.993 151.536 98.7803 146.133 93.1537 140.209C87.5344 134.293 84.553 127.927 84.553 121.362C84.553 114.797 87.5344 108.431 93.1537 102.515C98.7803 96.5909 106.993 91.1879 117.256 86.6177C137.778 77.4791 166.234 71.7883 197.745 71.7883C229.257 71.7883 257.713 77.4791 278.235 86.6177C288.497 91.1879 296.71 96.5909 302.337 102.515C307.956 108.431 310.937 114.797 310.937 121.362Z" stroke="#B38519" stroke-width="3"/>
|
||||
<path d="M312 123C312 150.614 260.737 173 197.5 173C134.263 173 83 150.614 83 123C83 95.3858 134.263 73 197.5 73C260.737 73 312 95.3858 312 123Z" fill="url(#paint2_linear_464_451)"/>
|
||||
<path d="M312 123C312 150.614 260.737 173 197.5 173C134.263 173 83 150.614 83 123C83 95.3858 134.263 73 197.5 73C260.737 73 312 95.3858 312 123Z" fill="url(#paint3_linear_464_451)"/>
|
||||
<rect width="62.7775" height="40.8114" rx="5" transform="matrix(0.859385 0.486424 -0.512512 0.872543 356.912 105.104)" fill="#EA5585"/>
|
||||
<path d="M358.482 165.616C357.162 166.339 355.581 165.445 355.558 163.961L355.339 150.064C355.314 148.501 357.019 147.467 358.365 148.229L370.945 155.35C372.291 156.112 372.234 158.078 370.844 158.84L358.482 165.616Z" fill="#EA5585"/>
|
||||
<ellipse rx="4.32081" ry="4.47376" transform="matrix(0.487833 0.872937 -0.858827 0.512266 360.684 132.021)" fill="white"/>
|
||||
<ellipse rx="4.32081" ry="4.47376" transform="matrix(0.487833 0.872937 -0.858827 0.512266 372.733 138.916)" fill="white"/>
|
||||
<ellipse rx="4.32081" ry="4.47376" transform="matrix(0.487833 0.872937 -0.858827 0.512266 384.783 145.81)" fill="white"/>
|
||||
<path d="M188.07 2.34887C188.404 1.50629 189.596 1.50629 189.93 2.34888L195.043 15.2661C195.15 15.5371 195.371 15.7479 195.646 15.8431L209.268 20.5549C210.165 20.8654 210.165 22.1346 209.268 22.4451L195.646 27.1569C195.371 27.2521 195.15 27.4629 195.043 27.7339L189.93 40.6511C189.596 41.4937 188.404 41.4937 188.07 40.6511L182.957 27.7339C182.85 27.4629 182.629 27.2521 182.354 27.1569L168.732 22.4451C167.835 22.1346 167.835 20.8654 168.732 20.5549L182.354 15.8431C182.629 15.7479 182.85 15.5371 182.957 15.2661L188.07 2.34887Z" fill="#FBE54D"/>
|
||||
<path d="M33.557 127.673C33.8709 126.783 35.1291 126.783 35.443 127.673L39.884 140.26C39.981 140.535 40.1933 140.754 40.4652 140.859L52.5978 145.568C53.4487 145.898 53.4487 147.102 52.5978 147.432L40.4652 152.141C40.1933 152.246 39.981 152.465 39.884 152.74L35.443 165.327C35.1291 166.217 33.8709 166.217 33.557 165.327L29.116 152.74C29.019 152.465 28.8067 152.246 28.5348 152.141L16.4022 147.432C15.5513 147.102 15.5513 145.898 16.4022 145.568L28.5348 140.859C28.8067 140.754 29.019 140.535 29.116 140.26L33.557 127.673Z" fill="#FBE54D"/>
|
||||
<path d="M148.553 266.786C148.86 265.882 150.14 265.882 150.447 266.786L155.429 281.448C155.523 281.724 155.732 281.945 156.003 282.054L169.698 287.572C170.533 287.909 170.533 289.091 169.698 289.428L156.003 294.946C155.732 295.055 155.523 295.276 155.429 295.552L150.447 310.214C150.14 311.118 148.86 311.118 148.553 310.214L143.571 295.552C143.477 295.276 143.268 295.055 142.997 294.946L129.302 289.428C128.467 289.091 128.467 287.909 129.302 287.572L142.997 282.054C143.268 281.945 143.477 281.724 143.571 281.448L148.553 266.786Z" fill="#FBE54D"/>
|
||||
<path d="M340.065 188.473C340.391 187.611 341.609 187.611 341.935 188.473L347.049 201.993C347.153 202.266 347.37 202.48 347.644 202.579L361.402 207.56C362.282 207.878 362.282 209.122 361.402 209.44L347.644 214.421C347.37 214.52 347.153 214.734 347.049 215.007L341.935 228.527C341.609 229.389 340.391 229.389 340.065 228.527L334.951 215.007C334.847 214.734 334.63 214.52 334.356 214.421L320.598 209.44C319.718 209.122 319.718 207.878 320.598 207.56L334.356 202.579C334.63 202.48 334.847 202.266 334.951 201.993L340.065 188.473Z" fill="#FBE54D"/>
|
||||
<rect width="68.9835" height="44.8202" rx="5" transform="matrix(0.858588 -0.512666 0.48744 0.873157 25.707 37.4084)" fill="#67E2A5"/>
|
||||
<path d="M85.4411 70.007C85.4858 71.629 83.7437 72.6692 82.4078 71.8182L67.2894 62.187C66.0329 61.3864 66.0791 59.4893 67.374 58.7161L81.9867 49.9908C83.2816 49.2176 84.8933 50.1248 84.9354 51.6505L85.4411 70.007Z" fill="#67E2A5"/>
|
||||
<ellipse cx="60.8525" cy="32.4967" rx="6.64913" ry="6.87663" fill="white"/>
|
||||
<path d="M59.0778 56.9464C56.3857 52.1241 58.0474 45.9196 62.7892 43.0882L70.296 38.6059C75.0378 35.7745 81.0642 37.3885 83.7563 42.2108L85.2766 44.9343L60.5981 59.6699L59.0778 56.9464Z" fill="white"/>
|
||||
<rect width="8" height="35.872" rx="4" transform="matrix(-0.533901 -0.845547 0.884338 -0.466847 146 128)" fill="#B38519"/>
|
||||
<rect width="8" height="64.5197" rx="4" transform="matrix(-0.948835 -0.315772 0.369837 -0.929097 190.885 155)" fill="#B38519"/>
|
||||
<rect width="8" height="35.872" rx="4" transform="matrix(-0.533901 0.845547 -0.884338 -0.466847 178 134)" fill="#B38519"/>
|
||||
<path d="M225.537 139.133C223.584 140.164 221.044 139.486 219.864 137.618V137.618C218.685 135.75 219.313 133.4 221.266 132.368L245.914 119.356C247.868 118.325 250.408 119.003 251.587 120.871V120.871C252.767 122.739 252.139 125.089 250.186 126.121L225.537 139.133Z" fill="#B38519"/>
|
||||
<rect width="8" height="35.872" rx="4" transform="matrix(-0.533901 0.845547 -0.884338 -0.466847 254 121)" fill="#B38519"/>
|
||||
<defs>
|
||||
<linearGradient id="paint0_linear_464_451" x1="189.835" y1="186.736" x2="362.561" y2="-21.2541" gradientUnits="userSpaceOnUse">
|
||||
<stop stop-color="#FFCC53"/>
|
||||
<stop offset="0.418898" stop-color="#FFDC8A"/>
|
||||
<stop offset="1" stop-color="#FFF3D7"/>
|
||||
</linearGradient>
|
||||
<linearGradient id="paint1_linear_464_451" x1="189.835" y1="186.736" x2="362.561" y2="-21.2541" gradientUnits="userSpaceOnUse">
|
||||
<stop stop-color="#FFCC53"/>
|
||||
<stop offset="0.418898" stop-color="#FFDC8A"/>
|
||||
<stop offset="1" stop-color="#FFF3D7"/>
|
||||
</linearGradient>
|
||||
<linearGradient id="paint2_linear_464_451" x1="190.561" y1="173" x2="320.885" y2="-4.20097" gradientUnits="userSpaceOnUse">
|
||||
<stop stop-color="#FEB915"/>
|
||||
<stop offset="0.418898" stop-color="#FFDC8A"/>
|
||||
<stop offset="1" stop-color="#FFF3D7"/>
|
||||
</linearGradient>
|
||||
<linearGradient id="paint3_linear_464_451" x1="190.561" y1="173" x2="320.885" y2="-4.20097" gradientUnits="userSpaceOnUse">
|
||||
<stop stop-color="#FEB915"/>
|
||||
<stop offset="0.418898" stop-color="#FFDC8A"/>
|
||||
<stop offset="1" stop-color="#FFF3D7"/>
|
||||
</linearGradient>
|
||||
</defs>
|
||||
</svg>
|
After Width: | Height: | Size: 10 KiB |
|
@ -0,0 +1,60 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg id="Layer_1" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 582.39 458.49">
|
||||
<defs>
|
||||
<style>
|
||||
.cls-1 {
|
||||
fill: #00e5a0;
|
||||
}
|
||||
|
||||
.cls-2 {
|
||||
fill: #eef2f5;
|
||||
}
|
||||
|
||||
.cls-3 {
|
||||
fill: #e6e6e6;
|
||||
}
|
||||
|
||||
.cls-4 {
|
||||
fill: #fee400;
|
||||
}
|
||||
|
||||
.cls-5 {
|
||||
fill: #fff;
|
||||
}
|
||||
|
||||
.cls-6 {
|
||||
fill: #ff4585;
|
||||
}
|
||||
|
||||
.cls-7 {
|
||||
fill: #7f7ff0;
|
||||
}
|
||||
|
||||
.cls-8 {
|
||||
fill: #363636;
|
||||
}
|
||||
</style>
|
||||
</defs>
|
||||
<ellipse class="cls-2" cx="291.19" cy="428.46" rx="291.19" ry="30.03"/>
|
||||
<path class="cls-7" d="M94.28,226.37c0-108.75,88.16-196.92,196.92-196.92s196.92,88.16,196.92,196.92c0,75.78-42.81,141.57-105.57,174.49-27.3,14.32-58.38-12.43-91.35-12.43-22.94,0-44.96,30.93-65.44,23.72-76.58-26.98-131.47-99.97-131.47-185.78Z"/>
|
||||
<rect class="cls-6" x="596.3" y="-67.3" width="59.5" height="90.16" rx="11.44" ry="11.44" transform="translate(328.22 528.9) rotate(-59.58)"/>
|
||||
<g>
|
||||
<rect class="cls-3" x="158.7" y="37.28" width="265.22" height="378.18" rx="30" ry="30" transform="translate(-10.62 14.38) rotate(-2.78)"/>
|
||||
<rect class="cls-5" x="145.53" y="37.92" width="265.22" height="378.18" rx="30" ry="30" transform="translate(-10.67 13.74) rotate(-2.78)"/>
|
||||
<path class="cls-6" d="M140.58,128.04l-2.6-53.51c-.8-16.55,11.96-30.62,28.51-31.42l204.98-9.94c16.55-.8,30.62,11.96,31.42,28.51l2.6,53.51-264.91,12.85Z"/>
|
||||
<rect class="cls-8" x="161.75" y="143.74" width="128.01" height="12.88" rx="6.42" ry="6.42" transform="translate(-7.01 11.11) rotate(-2.78)"/>
|
||||
<rect class="cls-3" x="164.92" y="208.64" width="160" height="12.88" rx="6.42" ry="6.42" transform="translate(-10.13 12.12) rotate(-2.78)"/>
|
||||
<rect class="cls-8" x="163.38" y="178.26" width="58.72" height="12.88" rx="6.42" ry="6.42" transform="translate(-8.72 9.55) rotate(-2.78)"/>
|
||||
<rect class="cls-3" x="166.54" y="242.71" width="108.99" height="12.88" rx="6.42" ry="6.42" transform="translate(-11.81 11) rotate(-2.78)"/>
|
||||
<rect class="cls-3" x="170.18" y="317.14" width="160" height="12.88" rx="6.42" ry="6.42" transform="translate(-15.38 12.5) rotate(-2.78)"/>
|
||||
<rect class="cls-3" x="168.62" y="285.54" width="108.99" height="12.88" rx="6.42" ry="6.42" transform="translate(-13.88 11.15) rotate(-2.78)"/>
|
||||
<rect class="cls-3" x="171.8" y="351.21" width="108.99" height="12.88" rx="6.42" ry="6.42" transform="translate(-17.06 11.38) rotate(-2.78)"/>
|
||||
<rect class="cls-4" x="319.94" y="77.98" width="60.57" height="63.56" rx="13.76" ry="13.76" transform="translate(-4.91 17.09) rotate(-2.78)"/>
|
||||
</g>
|
||||
<g>
|
||||
<circle class="cls-1" cx="405.49" cy="348.96" r="51.89"/>
|
||||
<path class="cls-5" d="M396.69,374.45l-24.26-23.7,10.85-11.13,13.74,13.42,31.52-28.99,10.51,11.44s-42.34,38.96-42.34,38.96Z"/>
|
||||
</g>
|
||||
<path class="cls-4" d="M141.58,319.12l12.69,22.46c.94,1.66,2.72,2.66,4.63,2.61l25.78-.8c5.36-.17,7.35,6.96,2.68,9.6l-22.46,12.69c-1.66,.94-2.66,2.72-2.61,4.63l.8,25.78c.17,5.36-6.96,7.35-9.6,2.68l-12.69-22.46c-.94-1.66-2.72-2.66-4.63-2.61l-25.78,.8c-5.36,.17-7.35-6.96-2.68-9.6l22.46-12.69c1.66-.94,2.66-2.72,2.61-4.63l-.8-25.78c-.17-5.36,6.96-7.35,9.6-2.68Z"/>
|
||||
<path class="cls-4" d="M456.08,148.79l-.5,22.57c-.05,2.16,1.11,4.18,3,5.23l19.75,10.93c5.32,2.95,3.13,11.06-2.95,10.92l-22.57-.5c-2.16-.05-4.18,1.11-5.23,3l-10.93,19.75c-2.95,5.32-11.06,3.13-10.92-2.95l.5-22.57c.05-2.16-1.11-4.18-3-5.23l-19.75-10.93c-5.32-2.95-3.13-11.06,2.95-10.92l22.57,.5c2.16,.05,4.18-1.11,5.23-3l10.93-19.75c2.95-5.32,11.06-3.13,10.92,2.95Z"/>
|
||||
</svg>
|
After Width: | Height: | Size: 3.5 KiB |
After Width: | Height: | Size: 144 KiB |
After Width: | Height: | Size: 38 KiB |
After Width: | Height: | Size: 21 KiB |
After Width: | Height: | Size: 189 KiB |
After Width: | Height: | Size: 16 KiB |
After Width: | Height: | Size: 69 KiB |
After Width: | Height: | Size: 130 KiB |
After Width: | Height: | Size: 30 KiB |
After Width: | Height: | Size: 74 KiB |
After Width: | Height: | Size: 26 KiB |
After Width: | Height: | Size: 29 KiB |
After Width: | Height: | Size: 88 KiB |
|
@ -0,0 +1,250 @@
|
|||
import clsx from 'clsx';
|
||||
import Link from 'next/link';
|
||||
import { useRouter } from 'next/router';
|
||||
import { signOut, useSession } from 'next-auth/react';
|
||||
import type { ReactNode } from 'react';
|
||||
import { Fragment, useState } from 'react';
|
||||
import { Menu, Transition } from '@headlessui/react';
|
||||
import { Bars3BottomLeftIcon } from '@heroicons/react/24/outline';
|
||||
import { Button } from '~/ui';
|
||||
|
||||
import GlobalNavigation from '~/components/global/GlobalNavigation';
|
||||
import HomeNavigation from '~/components/global/HomeNavigation';
|
||||
import OffersNavigation, {
|
||||
OffersNavigationAdmin,
|
||||
OffersNavigationAuthenticated,
|
||||
} from '~/components/offers/OffersNavigation';
|
||||
import QuestionsNavigation from '~/components/questions/QuestionsNavigation';
|
||||
import ResumesNavigation from '~/components/resumes/ResumesNavigation';
|
||||
|
||||
import { trpc } from '~/utils/trpc';
|
||||
|
||||
import GoogleAnalytics from './GoogleAnalytics';
|
||||
import MobileNavigation from './MobileNavigation';
|
||||
import type { ProductNavigationItems } from './ProductNavigation';
|
||||
import ProductNavigation from './ProductNavigation';
|
||||
import loginPageHref from '../shared/loginPageHref';
|
||||
|
||||
type Props = Readonly<{
|
||||
children: ReactNode;
|
||||
}>;
|
||||
|
||||
function ProfileJewel() {
|
||||
const router = useRouter();
|
||||
const { data: session, status } = useSession();
|
||||
const isSessionLoading = status === 'loading';
|
||||
|
||||
if (isSessionLoading) {
|
||||
return null;
|
||||
}
|
||||
|
||||
const loginHref = loginPageHref();
|
||||
if (session == null) {
|
||||
return router.pathname !== loginHref.pathname ? (
|
||||
<div className="flex items-center space-x-4">
|
||||
<Link
|
||||
className="hover:text-primary-500 text-xs font-medium text-slate-700"
|
||||
href={loginHref}>
|
||||
Sign In
|
||||
</Link>
|
||||
<Button
|
||||
href={{
|
||||
...loginHref,
|
||||
query: {
|
||||
...loginHref.query,
|
||||
mode: 'signup',
|
||||
},
|
||||
}}
|
||||
label="Sign Up"
|
||||
size="sm"
|
||||
variant="tertiary"
|
||||
/>
|
||||
</div>
|
||||
) : null;
|
||||
}
|
||||
|
||||
const userNavigation = [
|
||||
{ href: '/settings', name: 'Settings' },
|
||||
{
|
||||
href: '/api/auth/signout',
|
||||
name: 'Sign Out',
|
||||
onClick: (event: React.MouseEvent<HTMLAnchorElement>) => {
|
||||
event.preventDefault();
|
||||
signOut();
|
||||
},
|
||||
},
|
||||
];
|
||||
|
||||
return (
|
||||
<Menu as="div" className="relative flex-shrink-0">
|
||||
<div>
|
||||
<Menu.Button className="focus:ring-primary-500 flex rounded-full bg-white text-sm focus:outline-none focus:ring-2 focus:ring-offset-2">
|
||||
<span className="sr-only">Open user menu</span>
|
||||
{session?.user?.image == null ? (
|
||||
<span>TODO: Render some icon</span>
|
||||
) : (
|
||||
<img
|
||||
alt={session?.user?.email ?? session?.user?.name ?? ''}
|
||||
className="h-8 w-8 rounded-full"
|
||||
src={session?.user.image}
|
||||
/>
|
||||
)}
|
||||
</Menu.Button>
|
||||
</div>
|
||||
<Transition
|
||||
as={Fragment}
|
||||
enter="transition ease-out duration-100"
|
||||
enterFrom="transform opacity-0 scale-95"
|
||||
enterTo="transform opacity-100 scale-100"
|
||||
leave="transition ease-in duration-75"
|
||||
leaveFrom="transform opacity-100 scale-100"
|
||||
leaveTo="transform opacity-0 scale-95">
|
||||
<Menu.Items className="absolute right-0 z-10 mt-2 w-48 origin-top-right rounded-md bg-white py-1 shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none">
|
||||
{!!session?.user?.name && (
|
||||
<Menu.Item>
|
||||
{() => (
|
||||
<span className="block px-4 py-2 text-sm font-semibold text-slate-700">
|
||||
{session?.user?.name ?? ''}
|
||||
</span>
|
||||
)}
|
||||
</Menu.Item>
|
||||
)}
|
||||
{userNavigation.map((item) => (
|
||||
<Menu.Item key={item.name}>
|
||||
{({ active }) => (
|
||||
<Link
|
||||
className={clsx(
|
||||
active ? 'bg-slate-100' : '',
|
||||
'block px-4 py-2 text-sm text-slate-700',
|
||||
)}
|
||||
href={item.href}
|
||||
onClick={item.onClick}>
|
||||
{item.name}
|
||||
</Link>
|
||||
)}
|
||||
</Menu.Item>
|
||||
))}
|
||||
</Menu.Items>
|
||||
</Transition>
|
||||
</Menu>
|
||||
);
|
||||
}
|
||||
|
||||
export default function AppShell({ children }: Props) {
|
||||
const [mobileMenuOpen, setMobileMenuOpen] = useState(false);
|
||||
const router = useRouter();
|
||||
const { data: session } = useSession();
|
||||
// TODO: Shift this into offers pages and not in this common component.
|
||||
const { isLoading: isOffersAdminResultsLoading, data: isOffersAdmin } =
|
||||
trpc.useQuery(['offers.admin.isAdmin']);
|
||||
const currentProductNavigation: Readonly<{
|
||||
logo?: React.ReactNode;
|
||||
navigation: ProductNavigationItems;
|
||||
showGlobalNav: boolean;
|
||||
title: string;
|
||||
titleHref: string;
|
||||
}> = (() => {
|
||||
const path = router.pathname;
|
||||
if (path.startsWith('/resumes')) {
|
||||
return ResumesNavigation;
|
||||
}
|
||||
|
||||
if (path.startsWith('/offers')) {
|
||||
if (session == null) {
|
||||
return OffersNavigation;
|
||||
}
|
||||
if (!isOffersAdminResultsLoading && isOffersAdmin) {
|
||||
return OffersNavigationAdmin;
|
||||
}
|
||||
return OffersNavigationAuthenticated;
|
||||
}
|
||||
|
||||
if (path.startsWith('/questions')) {
|
||||
return QuestionsNavigation;
|
||||
}
|
||||
|
||||
return HomeNavigation;
|
||||
})();
|
||||
|
||||
return (
|
||||
<GoogleAnalytics>
|
||||
<div className="flex">
|
||||
{/* Narrow sidebar */}
|
||||
{currentProductNavigation.showGlobalNav && (
|
||||
<div className="hidden w-28 overflow-y-auto border-r border-slate-200 bg-white md:block">
|
||||
<div className="flex w-full flex-col items-center py-6">
|
||||
<div className="flex flex-shrink-0 items-center">
|
||||
<Link href="/">
|
||||
<img
|
||||
alt="Tech Interview Handbook"
|
||||
className="h-8 w-auto"
|
||||
src="/logo.svg"
|
||||
/>
|
||||
</Link>
|
||||
</div>
|
||||
<div className="mt-6 w-full flex-1 space-y-1 px-2">
|
||||
{GlobalNavigation.map((item) => (
|
||||
<Link
|
||||
key={item.name}
|
||||
className={clsx(
|
||||
'text-slate-700 hover:bg-slate-100',
|
||||
'group flex w-full flex-col items-center rounded-md p-3 text-xs font-medium',
|
||||
)}
|
||||
href={item.href}>
|
||||
<item.icon
|
||||
aria-hidden="true"
|
||||
className={clsx(
|
||||
'text-slate-500 group-hover:text-slate-700',
|
||||
'h-6 w-6',
|
||||
)}
|
||||
/>
|
||||
<span className="mt-2">{item.name}</span>
|
||||
</Link>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
{/* Mobile menu */}
|
||||
<MobileNavigation
|
||||
globalNavigationItems={GlobalNavigation}
|
||||
isShown={mobileMenuOpen}
|
||||
logo={currentProductNavigation.logo}
|
||||
productNavigationItems={currentProductNavigation.navigation}
|
||||
productTitle={currentProductNavigation.title}
|
||||
setIsShown={setMobileMenuOpen}
|
||||
/>
|
||||
{/* Content area */}
|
||||
<div className="w-full">
|
||||
{/* Navigation Bar */}
|
||||
<header className="sticky top-0 z-10 w-full">
|
||||
<div className="relative flex h-16 flex-shrink-0 border-b border-slate-200 bg-white shadow-sm">
|
||||
<button
|
||||
className="focus:ring-primary-500 border-r border-slate-200 px-4 text-slate-500 focus:outline-none focus:ring-2 focus:ring-inset md:hidden"
|
||||
type="button"
|
||||
onClick={() => setMobileMenuOpen(true)}>
|
||||
<span className="sr-only">Open sidebar</span>
|
||||
<Bars3BottomLeftIcon aria-hidden="true" className="h-6 w-6" />
|
||||
</button>
|
||||
<div className="flex flex-1 justify-between px-4 sm:px-6 lg:px-8">
|
||||
<div className="flex flex-1 items-center">
|
||||
<ProductNavigation
|
||||
items={currentProductNavigation.navigation}
|
||||
logo={currentProductNavigation.logo}
|
||||
title={currentProductNavigation.title}
|
||||
titleHref={currentProductNavigation.titleHref}
|
||||
/>
|
||||
</div>
|
||||
<div className="ml-2 flex items-center space-x-4 sm:ml-6 sm:space-x-6">
|
||||
<ProfileJewel />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
{/* Main Content */}
|
||||
<div className="w-full">{children}</div>
|
||||
</div>
|
||||
</div>
|
||||
</GoogleAnalytics>
|
||||
);
|
||||
}
|
|
@ -0,0 +1,24 @@
|
|||
import {
|
||||
BriefcaseIcon,
|
||||
CurrencyDollarIcon,
|
||||
DocumentTextIcon,
|
||||
} from '@heroicons/react/24/outline';
|
||||
|
||||
type GlobalNavigationItem = Readonly<{
|
||||
href: string;
|
||||
icon: (props: React.ComponentProps<'svg'>) => JSX.Element;
|
||||
name: string;
|
||||
}>;
|
||||
export type GlobalNavigationItems = ReadonlyArray<GlobalNavigationItem>;
|
||||
|
||||
const globalNavigation: GlobalNavigationItems = [
|
||||
{ href: '/offers', icon: CurrencyDollarIcon, name: 'Offers' },
|
||||
{
|
||||
href: '/questions',
|
||||
icon: BriefcaseIcon,
|
||||
name: 'Questions',
|
||||
},
|
||||
{ href: '/resumes', icon: DocumentTextIcon, name: 'Resumes' },
|
||||
];
|
||||
|
||||
export default globalNavigation;
|
|
@ -0,0 +1,99 @@
|
|||
import { useRouter } from 'next/router';
|
||||
import Script from 'next/script';
|
||||
import { createContext, useContext, useEffect } from 'react';
|
||||
|
||||
type Context = Readonly<{
|
||||
event: (payload: GoogleAnalyticsEventPayload) => void;
|
||||
}>;
|
||||
|
||||
const MEASUREMENT_ID = 'G-DBLZDQ2ZZN';
|
||||
|
||||
export const GoogleAnalyticsContext = createContext<Context>({
|
||||
event,
|
||||
});
|
||||
|
||||
// https://developers.google.com/analytics/devguides/collection/gtagjs/pages
|
||||
function pageview(url: string) {
|
||||
// Don't log analytics during development.
|
||||
if (process.env.NODE_ENV === 'development') {
|
||||
return;
|
||||
}
|
||||
|
||||
window.gtag('event', 'page_view', {
|
||||
page_location: window.location.href,
|
||||
page_path: url,
|
||||
page_title: document.title,
|
||||
});
|
||||
}
|
||||
|
||||
type GoogleAnalyticsEventPayload = Readonly<{
|
||||
action: string;
|
||||
category: string;
|
||||
label: string;
|
||||
value?: number;
|
||||
}>;
|
||||
|
||||
// https://developers.google.com/analytics/devguides/collection/gtagjs/events
|
||||
export function event({
|
||||
action,
|
||||
category,
|
||||
label,
|
||||
value,
|
||||
}: GoogleAnalyticsEventPayload) {
|
||||
// Don't log analytics during development.
|
||||
if (process.env.NODE_ENV === 'development') {
|
||||
return;
|
||||
}
|
||||
|
||||
window.gtag('event', action, {
|
||||
event_category: category,
|
||||
event_label: label,
|
||||
value,
|
||||
});
|
||||
}
|
||||
|
||||
type Props = Readonly<{
|
||||
children: React.ReactNode;
|
||||
}>;
|
||||
|
||||
export function useGoogleAnalytics() {
|
||||
return useContext(GoogleAnalyticsContext);
|
||||
}
|
||||
|
||||
export default function GoogleAnalytics({ children }: Props) {
|
||||
const router = useRouter();
|
||||
useEffect(() => {
|
||||
function handleRouteChange(url: string) {
|
||||
pageview(url);
|
||||
}
|
||||
|
||||
router.events.on('routeChangeComplete', handleRouteChange);
|
||||
return () => {
|
||||
router.events.off('routeChangeComplete', handleRouteChange);
|
||||
};
|
||||
}, [router.events,]);
|
||||
|
||||
return (
|
||||
<GoogleAnalyticsContext.Provider value={{ event }}>
|
||||
{children}
|
||||
{/* Global Site Tag (gtag.js) - Google Analytics */}
|
||||
<Script
|
||||
async={true}
|
||||
src={`https://www.googletagmanager.com/gtag/js?id=${MEASUREMENT_ID}`}
|
||||
/>
|
||||
<Script
|
||||
dangerouslySetInnerHTML={{
|
||||
__html: `
|
||||
window.dataLayer = window.dataLayer || [];
|
||||
window.gtag = function(){dataLayer.push(arguments);}
|
||||
gtag('js', new Date());
|
||||
gtag('config', '${MEASUREMENT_ID}', {
|
||||
page_path: window.location.pathname,
|
||||
});
|
||||
`,
|
||||
}}
|
||||
id="google-analytics"
|
||||
/>
|
||||
</GoogleAnalyticsContext.Provider>
|
||||
);
|
||||
}
|