-
Notifications
You must be signed in to change notification settings - Fork 1
Wagering #19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
fmhall
wants to merge
9
commits into
Merit-Systems:master
Choose a base branch
from
fmhall:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Wagering #19
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
da6a07c
db models, tool logic, helpers
fmhall 9af2491
running locally, env, small logic fix
fmhall 2837bbf
Merge remote-tracking branch 'origin'
fmhall 531f6d9
remove from readme
fmhall 46cddcd
small thing
fmhall 897c2eb
only enable wagering if db flag is on
fmhall 2c93d26
add to context, update system prompt
fmhall 24d2dd5
Merge branch 'rsproule:master' into master
fmhall 01a2234
rm
fmhall File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,3 @@ | ||
| # Operation Whiskers | ||
|
|
||
| Classified | ||
| Classified |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,57 @@ | ||
| -- CreateEnum | ||
| CREATE TYPE "WagerStatus" AS ENUM ('open', 'active', 'pending_verification', 'resolved', 'cancelled'); | ||
|
|
||
| -- CreateEnum | ||
| CREATE TYPE "VerificationType" AS ENUM ('subjective', 'deadline', 'photo_proof'); | ||
|
|
||
| -- CreateTable | ||
| CREATE TABLE "Wager" ( | ||
| "id" TEXT NOT NULL, | ||
| "conversationId" TEXT NOT NULL, | ||
| "creatorPhone" TEXT NOT NULL, | ||
| "title" TEXT NOT NULL, | ||
| "condition" TEXT NOT NULL, | ||
| "sides" TEXT[], | ||
| "verificationType" "VerificationType" NOT NULL, | ||
| "verificationConfig" JSONB, | ||
| "status" "WagerStatus" NOT NULL DEFAULT 'open', | ||
| "deadline" TIMESTAMP(3), | ||
| "result" TEXT, | ||
| "resolvedAt" TIMESTAMP(3), | ||
| "proofUrl" TEXT, | ||
| "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, | ||
| "updatedAt" TIMESTAMP(3) NOT NULL, | ||
|
|
||
| CONSTRAINT "Wager_pkey" PRIMARY KEY ("id") | ||
| ); | ||
|
|
||
| -- CreateTable | ||
| CREATE TABLE "WagerPosition" ( | ||
| "id" TEXT NOT NULL, | ||
| "wagerId" TEXT NOT NULL, | ||
| "phone" TEXT NOT NULL, | ||
| "side" TEXT NOT NULL, | ||
| "amount" DECIMAL(10,2) NOT NULL, | ||
| "matchedAmount" DECIMAL(10,2) NOT NULL DEFAULT 0, | ||
| "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, | ||
|
|
||
| CONSTRAINT "WagerPosition_pkey" PRIMARY KEY ("id") | ||
| ); | ||
|
|
||
| -- CreateIndex | ||
| CREATE INDEX "Wager_conversationId_status_idx" ON "Wager"("conversationId", "status"); | ||
|
|
||
| -- CreateIndex | ||
| CREATE INDEX "Wager_deadline_idx" ON "Wager"("deadline"); | ||
|
|
||
| -- CreateIndex | ||
| CREATE INDEX "WagerPosition_wagerId_idx" ON "WagerPosition"("wagerId"); | ||
|
|
||
| -- CreateIndex | ||
| CREATE INDEX "WagerPosition_phone_idx" ON "WagerPosition"("phone"); | ||
|
|
||
| -- AddForeignKey | ||
| ALTER TABLE "WagerPosition" ADD CONSTRAINT "WagerPosition_wagerId_fkey" FOREIGN KEY ("wagerId") REFERENCES "Wager"("id") ON DELETE CASCADE ON UPDATE CASCADE; | ||
|
|
||
| -- Add wageringEnabled flag to GroupChatSettings | ||
| ALTER TABLE "GroupChatSettings" ADD COLUMN "wageringEnabled" BOOLEAN NOT NULL DEFAULT false; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.