[offers][misc] update seed script

This commit is contained in:
Yangshun Tay
2022-11-07 10:17:45 +08:00
parent 5afb0506d2
commit 373480b9e1
4 changed files with 8 additions and 4 deletions

View File

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

View File

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

View File

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

View File

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