Compare commits

...

1 Commits

Author SHA1 Message Date
Swifty
f135a33b3a testing linting 2026-01-08 11:16:53 +01:00
2 changed files with 48 additions and 36 deletions

View File

@@ -0,0 +1,7 @@
-- CreateTable
CREATE TABLE "Testing" (
"id" TEXT NOT NULL,
"maxEmailsPerDay" INTEGER NOT NULL DEFAULT 3,
CONSTRAINT "Testing_pkey" PRIMARY KEY ("id")
);

View File

@@ -12,6 +12,11 @@ generator client {
partial_type_generator = "backend/data/partial_types.py" partial_type_generator = "backend/data/partial_types.py"
} }
model Testing {
id String @id // This should match the Supabase user ID
maxEmailsPerDay Int @default(3)
}
// User model to mirror Auth provider users // User model to mirror Auth provider users
model User { model User {
id String @id // This should match the Supabase user ID id String @id // This should match the Supabase user ID
@@ -127,8 +132,8 @@ model BuilderSearchHistory {
updatedAt DateTime @default(now()) @updatedAt updatedAt DateTime @default(now()) @updatedAt
searchQuery String searchQuery String
filter String[] @default([]) filter String[] @default([])
byCreator String[] @default([]) byCreator String[] @default([])
userId String userId String
User User @relation(fields: [userId], references: [id], onDelete: Cascade) User User @relation(fields: [userId], references: [id], onDelete: Cascade)
@@ -721,26 +726,26 @@ view StoreAgent {
storeListingVersionId String storeListingVersionId String
updated_at DateTime updated_at DateTime
slug String slug String
agent_name String agent_name String
agent_video String? agent_video String?
agent_output_demo String? agent_output_demo String?
agent_image String[] agent_image String[]
featured Boolean @default(false) featured Boolean @default(false)
creator_username String? creator_username String?
creator_avatar String? creator_avatar String?
sub_heading String sub_heading String
description String description String
categories String[] categories String[]
search Unsupported("tsvector")? @default(dbgenerated("''::tsvector")) search Unsupported("tsvector")? @default(dbgenerated("''::tsvector"))
runs Int runs Int
rating Float rating Float
versions String[] versions String[]
agentGraphVersions String[] agentGraphVersions String[]
agentGraphId String agentGraphId String
is_available Boolean @default(true) is_available Boolean @default(true)
useForOnboarding Boolean @default(false) useForOnboarding Boolean @default(false)
// Materialized views used (refreshed every 15 minutes via pg_cron): // Materialized views used (refreshed every 15 minutes via pg_cron):
// - mv_agent_run_counts - Pre-aggregated agent execution counts by agentGraphId // - mv_agent_run_counts - Pre-aggregated agent execution counts by agentGraphId
@@ -856,14 +861,14 @@ model StoreListingVersion {
AgentGraph AgentGraph @relation(fields: [agentGraphId, agentGraphVersion], references: [id, version]) AgentGraph AgentGraph @relation(fields: [agentGraphId, agentGraphVersion], references: [id, version])
// Content fields // Content fields
name String name String
subHeading String subHeading String
videoUrl String? videoUrl String?
agentOutputDemoUrl String? agentOutputDemoUrl String?
imageUrls String[] imageUrls String[]
description String description String
instructions String? instructions String?
categories String[] categories String[]
isFeatured Boolean @default(false) isFeatured Boolean @default(false)
@@ -998,16 +1003,16 @@ model OAuthApplication {
updatedAt DateTime @updatedAt updatedAt DateTime @updatedAt
// Application metadata // Application metadata
name String name String
description String? description String?
logoUrl String? // URL to app logo stored in GCS logoUrl String? // URL to app logo stored in GCS
clientId String @unique clientId String @unique
clientSecret String // Hashed with Scrypt (same as API keys) clientSecret String // Hashed with Scrypt (same as API keys)
clientSecretSalt String // Salt for Scrypt hashing clientSecretSalt String // Salt for Scrypt hashing
// OAuth configuration // OAuth configuration
redirectUris String[] // Allowed callback URLs redirectUris String[] // Allowed callback URLs
grantTypes String[] @default(["authorization_code", "refresh_token"]) grantTypes String[] @default(["authorization_code", "refresh_token"])
scopes APIKeyPermission[] // Which permissions the app can request scopes APIKeyPermission[] // Which permissions the app can request
// Application management // Application management