|
|
@ -4,6 +4,7 @@ import crypto from 'crypto';
|
|
|
|
import { baseCurrencyString } from '../src/utils/offers/currency';
|
|
|
|
import { baseCurrencyString } from '../src/utils/offers/currency';
|
|
|
|
import { convert } from '../src/utils/offers/currency/currencyExchange';
|
|
|
|
import { convert } from '../src/utils/offers/currency/currencyExchange';
|
|
|
|
import { generateAnalysis } from '../src/utils/offers/analysisGeneration';
|
|
|
|
import { generateAnalysis } from '../src/utils/offers/analysisGeneration';
|
|
|
|
|
|
|
|
import generateRandomName from '../src/utils/offers/randomNameGenerator';
|
|
|
|
|
|
|
|
|
|
|
|
const prisma = new PrismaClient();
|
|
|
|
const prisma = new PrismaClient();
|
|
|
|
|
|
|
|
|
|
|
@ -68,11 +69,15 @@ const seedSalaries = async () => {
|
|
|
|
.createHash('sha256')
|
|
|
|
.createHash('sha256')
|
|
|
|
.update(xlSerialToJsDate(data.Timestamp).toString())
|
|
|
|
.update(xlSerialToJsDate(data.Timestamp).toString())
|
|
|
|
.digest('hex');
|
|
|
|
.digest('hex');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Generate random name until unique
|
|
|
|
|
|
|
|
let uniqueName: string = await generateRandomName();
|
|
|
|
|
|
|
|
|
|
|
|
if (data.Type.toUpperCase() === 'INTERNSHIP') {
|
|
|
|
if (data.Type.toUpperCase() === 'INTERNSHIP') {
|
|
|
|
// create profile
|
|
|
|
// create profile
|
|
|
|
const dataAdded = await prisma.offersProfile.create({
|
|
|
|
const dataAdded = await prisma.offersProfile.create({
|
|
|
|
data: {
|
|
|
|
data: {
|
|
|
|
profileName: crypto.randomUUID().substring(0, 10),
|
|
|
|
profileName: uniqueName,
|
|
|
|
createdAt: xlSerialToJsDate(data.Timestamp),
|
|
|
|
createdAt: xlSerialToJsDate(data.Timestamp),
|
|
|
|
editToken: token,
|
|
|
|
editToken: token,
|
|
|
|
background: {
|
|
|
|
background: {
|
|
|
|