Skip to content

Commit a9de68d

Browse files
committed
Community details into the groups API - for future community app integration in platform-ui
1 parent 7b1f421 commit a9de68d

9 files changed

Lines changed: 882 additions & 469 deletions

File tree

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
-- CreateTable
2+
CREATE TABLE "CommunityMetadata" (
3+
"id" TEXT NOT NULL,
4+
"communityId" TEXT NOT NULL,
5+
"communityName" TEXT NOT NULL,
6+
"description" TEXT,
7+
"image" TEXT,
8+
"subdomains" TEXT[],
9+
"groupIds" TEXT[],
10+
"authorizedGroupIds" TEXT[],
11+
"terms" INTEGER[],
12+
"hidden" BOOLEAN NOT NULL DEFAULT false,
13+
"hideSearch" BOOLEAN NOT NULL DEFAULT false,
14+
"hideFilter" BOOLEAN NOT NULL DEFAULT false,
15+
"chevronOverAvatar" BOOLEAN NOT NULL DEFAULT false,
16+
"footerText" TEXT,
17+
"leaderboardApiUrl" TEXT,
18+
"newsFeed" TEXT,
19+
"challengeFilter" JSONB,
20+
"challengeListing" JSONB,
21+
"menuItems" JSONB NOT NULL,
22+
"logos" JSONB NOT NULL,
23+
"additionalLogos" TEXT[],
24+
"accessDeniedPage" JSONB,
25+
"createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
26+
"updatedAt" TIMESTAMP(3) NOT NULL,
27+
28+
CONSTRAINT "CommunityMetadata_pkey" PRIMARY KEY ("id")
29+
);
30+
31+
-- CreateIndex
32+
CREATE UNIQUE INDEX "CommunityMetadata_communityId_key" ON "CommunityMetadata"("communityId");
33+
34+
-- CreateIndex
35+
CREATE INDEX "CommunityMetadata_communityId_idx" ON "CommunityMetadata"("communityId");
36+
37+
-- CreateIndex
38+
CREATE INDEX "CommunityMetadata_hidden_idx" ON "CommunityMetadata"("hidden");
39+
40+
-- CreateIndex
41+
CREATE INDEX "CommunityMetadata_subdomains_idx" ON "CommunityMetadata"("subdomains");
42+
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
-- AlterTable
2+
ALTER TABLE "CommunityMetadata"
3+
ADD COLUMN "metadata" JSONB;

prisma/schema.prisma

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,3 +82,35 @@ model User {
8282
8383
@@index([universalUID])
8484
}
85+
86+
model CommunityMetadata {
87+
id String @id @default(uuid())
88+
communityId String @unique
89+
communityName String
90+
description String?
91+
image String?
92+
subdomains String[]
93+
groupIds String[]
94+
authorizedGroupIds String[]
95+
terms Int[]
96+
hidden Boolean @default(false)
97+
hideSearch Boolean @default(false)
98+
hideFilter Boolean @default(false)
99+
chevronOverAvatar Boolean @default(false)
100+
footerText String?
101+
leaderboardApiUrl String?
102+
newsFeed String?
103+
challengeFilter Json?
104+
challengeListing Json?
105+
metadata Json?
106+
menuItems Json
107+
logos Json
108+
additionalLogos String[]
109+
accessDeniedPage Json?
110+
createdAt DateTime @default(now())
111+
updatedAt DateTime @updatedAt
112+
113+
@@index([communityId])
114+
@@index([hidden])
115+
@@index([subdomains])
116+
}

0 commit comments

Comments
 (0)