Skip to content

Commit

Permalink
Merge pull request #81 from perimetre/dev
Browse files Browse the repository at this point in the history
dev
  • Loading branch information
AssisrMatheus authored Jan 29, 2024
2 parents 0982b84 + b36a0c1 commit 6f8fc64
Show file tree
Hide file tree
Showing 29 changed files with 4,160 additions and 1,041 deletions.
808 changes: 798 additions & 10 deletions graphql.schema.json

Large diffs are not rendered by default.

14 changes: 7 additions & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@
"graphql-middleware": "^6.0.10",
"graphql-shield": "^7.5.0",
"lodash": "^4.17.21",
"mime-types": "^2.1.35",
"multer": "^1.4.3",
"multer-s3": "^2.10.0",
"nanoid": "^3.2.0",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
-- AlterTable
ALTER TABLE `Module` ADD COLUMN `originalMarathonProductJson` JSON;
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
-- AlterTable
ALTER TABLE `Module` ADD COLUMN `isVirtualProduct` BOOLEAN NOT NULL DEFAULT false;
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
-- AlterTable
ALTER TABLE `Module` ADD COLUMN `ownerExternalId` VARCHAR(191);
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
-- AddForeignKey
ALTER TABLE `Module` ADD FOREIGN KEY (`ownerExternalId`) REFERENCES `Module`(`externalId`) ON DELETE SET NULL ON UPDATE CASCADE;
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
-- AlterTable
ALTER TABLE `List` ADD COLUMN `createdAt` DATETIME(0) DEFAULT CURRENT_TIMESTAMP(0),
ADD COLUMN `updatedAt` DATETIME(0) DEFAULT CURRENT_TIMESTAMP(0);
13 changes: 10 additions & 3 deletions prisma/schema.prisma
Original file line number Diff line number Diff line change
Expand Up @@ -86,11 +86,13 @@ model FinishTranslations {
}

model List {
id Int @id @default(autoincrement())
externalId String? @unique
id Int @id @default(autoincrement())
externalId String? @unique
name String?
createdAt DateTime? @default(now()) @db.DateTime(0)
updatedAt DateTime? @default(now()) @updatedAt @db.DateTime(0)
projectId Int?
project Project? @relation(fields: [projectId], references: [id])
project Project? @relation(fields: [projectId], references: [id])
}

model ModuleAttachments {
Expand All @@ -105,6 +107,8 @@ model Module {
id Int @id @default(autoincrement())
partNumber String @unique
externalId String? @unique
ownerExternalId String?
owner Module? @relation("ownerRelation", fields: [ownerExternalId], references: [externalId])
description String?
thumbnailUrl String? @db.VarChar(255)
bundleUrl String? @db.VarChar(255)
Expand All @@ -113,6 +117,7 @@ model Module {
isMat Boolean @default(false)
isExtension Boolean @default(false)
shouldHideBasedOnWidth Boolean @default(false)
isVirtualProduct Boolean @default(false)
createdAt DateTime @default(now()) @db.DateTime(0)
updatedAt DateTime @default(now()) @db.DateTime(0)
alwaysDisplay Boolean @default(false)
Expand All @@ -128,6 +133,7 @@ model Module {
collectionId Int
collection Collection @relation(fields: [collectionId], references: [id])
rules Json?
originalMarathonProductJson Json?
projectModules ProjectModule[]
moduleCategories ModuleCategory[]
defaultLeftExtensionParents Module[] @relation("defaultLeftExtensionRelation")
Expand All @@ -136,6 +142,7 @@ model Module {
moduleAttachments ModuleAttachments[] @relation("module_moduleAttachments")
moduleAttachedTo ModuleAttachments[] @relation("attachment_moduleAttachments")
moduleType ModuleType[]
modulesIOwn Module[] @relation("ownerRelation")
}

model Project {
Expand Down
Loading

0 comments on commit 6f8fc64

Please sign in to comment.