Skip to content

Commit

Permalink
Added moxie and talent profile models
Browse files Browse the repository at this point in the history
  • Loading branch information
Devorein committed Nov 21, 2024
1 parent 6e4f0c1 commit c61f1d8
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
-- CreateTable
CREATE TABLE "TalentProfile" (
"id" INTEGER NOT NULL,
"score" INTEGER NOT NULL,
"builderId" UUID NOT NULL,

CONSTRAINT "TalentProfile_pkey" PRIMARY KEY ("id")
);

-- CreateTable
CREATE TABLE "MoxieProfile" (
"id" INTEGER NOT NULL,
"builderId" UUID NOT NULL,

CONSTRAINT "MoxieProfile_pkey" PRIMARY KEY ("id")
);

-- CreateIndex
CREATE UNIQUE INDEX "TalentProfile_builderId_key" ON "TalentProfile"("builderId");

-- CreateIndex
CREATE INDEX "TalentProfile_builderId_idx" ON "TalentProfile"("builderId");

-- CreateIndex
CREATE UNIQUE INDEX "MoxieProfile_builderId_key" ON "MoxieProfile"("builderId");

-- CreateIndex
CREATE INDEX "MoxieProfile_builderId_idx" ON "MoxieProfile"("builderId");

-- AddForeignKey
ALTER TABLE "TalentProfile" ADD CONSTRAINT "TalentProfile_builderId_fkey" FOREIGN KEY ("builderId") REFERENCES "Scout"("id") ON DELETE CASCADE ON UPDATE CASCADE;

-- AddForeignKey
ALTER TABLE "MoxieProfile" ADD CONSTRAINT "MoxieProfile_builderId_fkey" FOREIGN KEY ("builderId") REFERENCES "Scout"("id") ON DELETE CASCADE ON UPDATE CASCADE;
19 changes: 19 additions & 0 deletions src/prisma/schema.prisma
Original file line number Diff line number Diff line change
Expand Up @@ -2829,6 +2829,8 @@ model Scout {
dailyClaimStreakEvents ScoutDailyClaimStreakEvent[]
referralCode String? @unique
referralCodeEvent ReferralCodeEvent[]
talentProfile TalentProfile?
moxieProfile MoxieProfile?
@@index([path])
@@index([farcasterId])
Expand Down Expand Up @@ -3295,3 +3297,20 @@ model ReferralCodeEvent {
@@index([builderEventId])
@@index([refereeId])
}

model TalentProfile {
id Int @id
score Int
builderId String @unique @db.Uuid
builder Scout @relation(fields: [builderId], references: [id], onDelete: Cascade)
@@index([builderId])
}

model MoxieProfile {
id Int @id // fid
builderId String @unique @db.Uuid
builder Scout @relation(fields: [builderId], references: [id], onDelete: Cascade)
@@index([builderId])
}

0 comments on commit c61f1d8

Please sign in to comment.