Skip to content

Commit

Permalink
SG - New place for wallet addresses
Browse files Browse the repository at this point in the history
  • Loading branch information
valentinludu committed Oct 28, 2024
1 parent 8688233 commit 50f5ff5
Show file tree
Hide file tree
Showing 2 changed files with 63 additions and 39 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
-- CreateTable
CREATE TABLE "ScoutWallet" (
"id" UUID NOT NULL,
"createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
"address" TEXT NOT NULL,
"scoutId" UUID NOT NULL,

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

-- CreateIndex
CREATE UNIQUE INDEX "ScoutWallet_address_key" ON "ScoutWallet"("address");

-- AddForeignKey
ALTER TABLE "ScoutWallet" ADD CONSTRAINT "ScoutWallet_scoutId_fkey" FOREIGN KEY ("scoutId") REFERENCES "Scout"("id") ON DELETE CASCADE ON UPDATE CASCADE;
87 changes: 48 additions & 39 deletions src/prisma/schema.prisma
Original file line number Diff line number Diff line change
Expand Up @@ -1356,46 +1356,46 @@ model ProposalEvaluationPermission {
}

model ProposalEvaluation {
id String @id @default(uuid()) @db.Uuid
index Int // tells us what order
title String
type ProposalEvaluationType
completedAt DateTime?
declinedAt DateTime? // Required to keep track of when the evaluation was declined for an appealable step
snapshotId String?
snapshotExpiry DateTime?
decidedBy String? @db.Uuid
decider User? @relation(fields: [decidedBy], references: [id], onDelete: SetNull, name: "decidedBy")
proposalId String @db.Uuid
proposal Proposal @relation(fields: [proposalId], references: [id], onDelete: Cascade)
voteSettings Json?
voteId String? @unique @db.Uuid
vote Vote? @relation(fields: [voteId], references: [id], onDelete: SetNull)
actionLabels Json?
notificationLabels Json?
requiredReviews Int @default(1)
finalStep Boolean?
appealRequiredReviews Int?
appealable Boolean? @default(false)
appealedAt DateTime?
appealedBy String? @db.Uuid
appealReason String?
appealer User? @relation(fields: [appealedBy], references: [id], onDelete: SetNull, name: "appealedBy")
shareReviews Boolean? @default(false)
dueDate DateTime?
id String @id @default(uuid()) @db.Uuid
index Int // tells us what order
title String
type ProposalEvaluationType
completedAt DateTime?
declinedAt DateTime? // Required to keep track of when the evaluation was declined for an appealable step
snapshotId String?
snapshotExpiry DateTime?
decidedBy String? @db.Uuid
decider User? @relation(fields: [decidedBy], references: [id], onDelete: SetNull, name: "decidedBy")
proposalId String @db.Uuid
proposal Proposal @relation(fields: [proposalId], references: [id], onDelete: Cascade)
voteSettings Json?
voteId String? @unique @db.Uuid
vote Vote? @relation(fields: [voteId], references: [id], onDelete: SetNull)
actionLabels Json?
notificationLabels Json?
requiredReviews Int @default(1)
finalStep Boolean?
appealRequiredReviews Int?
appealable Boolean? @default(false)
appealedAt DateTime?
appealedBy String? @db.Uuid
appealReason String?
appealer User? @relation(fields: [appealedBy], references: [id], onDelete: SetNull, name: "appealedBy")
shareReviews Boolean? @default(false)
dueDate DateTime?
showAuthorResultsOnRubricFail Boolean?
rubricCriteria ProposalRubricCriteria[]
rubricAnswers ProposalRubricCriteriaAnswer[]
draftRubricAnswers DraftProposalRubricCriteriaAnswer[]
result ProposalEvaluationResult?
reviewers ProposalReviewer[]
appealReviewers ProposalAppealReviewer[]
permissions ProposalEvaluationPermission[]
proposalNotification ProposalNotification[]
reviews ProposalEvaluationReview[]
appealReviews ProposalEvaluationAppealReview[]
documentsToSign DocumentToSign[]
evaluationApprovers ProposalEvaluationApprover[]
rubricCriteria ProposalRubricCriteria[]
rubricAnswers ProposalRubricCriteriaAnswer[]
draftRubricAnswers DraftProposalRubricCriteriaAnswer[]
result ProposalEvaluationResult?
reviewers ProposalReviewer[]
appealReviewers ProposalAppealReviewer[]
permissions ProposalEvaluationPermission[]
proposalNotification ProposalNotification[]
reviews ProposalEvaluationReview[]
appealReviews ProposalEvaluationAppealReview[]
documentsToSign DocumentToSign[]
evaluationApprovers ProposalEvaluationApprover[]
@@index([proposalId])
@@index([index])
Expand Down Expand Up @@ -2804,6 +2804,7 @@ model Scout {
agreedToTermsAt DateTime?
onboardedAt DateTime?
currentBalance Int @default(0)
scoutWallet ScoutWallet[]
strikes BuilderStrike[]
events BuilderEvent[]
githubUser GithubUser[]
Expand Down Expand Up @@ -3166,3 +3167,11 @@ model BuilderCardActivity {
@@unique([builderId])
}

model ScoutWallet {
id String @id @default(uuid()) @db.Uuid
createdAt DateTime @default(now())
address String @unique
scoutId String @db.Uuid
scout Scout @relation(fields: [scoutId], references: [id], onDelete: Cascade)
}

0 comments on commit 50f5ff5

Please sign in to comment.