[offers][misc] update seed script

pull/522/head
Yangshun Tay 2 years ago
parent 5afb0506d2
commit 373480b9e1

@ -0,0 +1,2 @@
-- AlterTable
ALTER TABLE "Company" ADD COLUMN "website" TEXT;

@ -98,6 +98,7 @@ model Company {
slug String @unique slug String @unique
description String? @db.Text description String? @db.Text
logoUrl String? logoUrl String?
website String?
createdAt DateTime @default(now()) createdAt DateTime @default(now())
updatedAt DateTime @updatedAt updatedAt DateTime @updatedAt

@ -96,13 +96,13 @@ const getLevel = (type: string) => {
processedType.includes('FRESH GRAD') || processedType.includes('FRESH GRAD') ||
processedType.includes('JUNIOR') processedType.includes('JUNIOR')
) { ) {
return 'L1'; return 'Junior';
} else if (processedType.includes('MID')) { } else if (processedType.includes('MID')) {
return 'L2'; return 'Mid';
} else if (processedType.includes('SENIOR')) { } else if (processedType.includes('SENIOR')) {
return 'L4'; return 'Senior';
} else { } else {
return 'L0'; return 'N/A';
} }
}; };

@ -16,6 +16,7 @@ async function main() {
name: company.name, name: company.name,
slug: company.slug, slug: company.slug,
description: company.description, description: company.description,
website: company.website,
logoUrl: company.logoUrl, logoUrl: company.logoUrl,
})), })),
skipDuplicates: true, skipDuplicates: true,

Loading…
Cancel
Save