feat(Phase1): Implement Scout API, Stripe Webhooks, and Builder Whitelisting
Some checks failed
Deploy to 110 WOOO Server / deploy (push) Failing after 7s
Some checks failed
Deploy to 110 WOOO Server / deploy (push) Failing after 7s
This commit is contained in:
@@ -5,42 +5,51 @@ generator client {
|
||||
|
||||
datasource db {
|
||||
provider = "postgresql"
|
||||
url = env("DATABASE_URL")
|
||||
}
|
||||
|
||||
model Task {
|
||||
id String @id @default(uuid())
|
||||
title String
|
||||
description String
|
||||
status String // Enum: TaskStatus (OPEN, EXECUTING, VERIFYING, COMPLETED, FAILED, etc)
|
||||
difficulty String // Enum: TaskDifficulty (HELLO_WORLD, COMPONENT, VIEW, EPIC)
|
||||
scope_clarity_score Float
|
||||
error_classification String? // Enum: TaskErrorClassification
|
||||
reward_amount Int // Stored in cents
|
||||
reward_currency String // USD, TWD, USDC
|
||||
acceptance_criteria Json // Contains validation_mode, test_file_content, rules
|
||||
required_stack String[]
|
||||
retry_count Int @default(0)
|
||||
stripe_payment_intent_id String?
|
||||
expires_at DateTime?
|
||||
created_at DateTime @default(now())
|
||||
updated_at DateTime @updatedAt
|
||||
id String @id @default(uuid())
|
||||
title String
|
||||
description String
|
||||
status String // Enum: TaskStatus (OPEN, EXECUTING, VERIFYING, COMPLETED, FAILED, etc)
|
||||
difficulty String // Enum: TaskDifficulty (HELLO_WORLD, COMPONENT, VIEW, EPIC)
|
||||
scope_clarity_score Float
|
||||
error_classification String? // Enum: TaskErrorClassification
|
||||
reward_amount Int // Stored in cents
|
||||
reward_currency String // USD, TWD, USDC
|
||||
acceptance_criteria Json // Contains validation_mode, test_file_content, rules
|
||||
required_stack String[]
|
||||
retry_count Int @default(0)
|
||||
stripe_payment_intent_id String?
|
||||
stripe_checkout_session_id String? // Used for Scout flow
|
||||
expires_at DateTime?
|
||||
created_at DateTime @default(now())
|
||||
updated_at DateTime @updatedAt
|
||||
|
||||
scout_id String?
|
||||
scout_agent AgentProfile? @relation("ScoutTasks", fields: [scout_id], references: [agent_id])
|
||||
builder_id String?
|
||||
builder_agent AgentProfile? @relation("BuilderTasks", fields: [builder_id], references: [agent_id])
|
||||
|
||||
claims Claim[]
|
||||
submissions Submission[]
|
||||
}
|
||||
|
||||
model Claim {
|
||||
id String @id @default(uuid())
|
||||
id String @id @default(uuid())
|
||||
task_id String
|
||||
task Task @relation(fields: [task_id], references: [id])
|
||||
task Task @relation(fields: [task_id], references: [id])
|
||||
agent_id String
|
||||
agent AgentProfile @relation(fields: [agent_id], references: [agent_id])
|
||||
developer_wallet String
|
||||
status String // EXECUTING, CANCELLED, VERIFYING, COMPLETED
|
||||
claim_token String @unique // Idempotency token for this claim
|
||||
claim_token String @unique // Idempotency token for this claim
|
||||
held_amount Int
|
||||
held_currency String
|
||||
expires_at DateTime
|
||||
created_at DateTime @default(now())
|
||||
updated_at DateTime @updatedAt
|
||||
created_at DateTime @default(now())
|
||||
updated_at DateTime @updatedAt
|
||||
|
||||
submissions Submission[]
|
||||
}
|
||||
@@ -99,3 +108,17 @@ model LedgerEntry {
|
||||
created_at DateTime @default(now())
|
||||
updated_at DateTime @updatedAt
|
||||
}
|
||||
|
||||
model AgentProfile {
|
||||
id String @id @default(uuid())
|
||||
agent_id String @unique
|
||||
type String // BUILDER or SCOUT
|
||||
wallet_address String?
|
||||
status String // WHITELISTED, BANNED, PENDING
|
||||
created_at DateTime @default(now())
|
||||
updated_at DateTime @updatedAt
|
||||
|
||||
tasks_as_scout Task[] @relation("ScoutTasks")
|
||||
tasks_as_builder Task[] @relation("BuilderTasks")
|
||||
claims Claim[]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user