File size: 1,711 Bytes
b225a21 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 |
datasource db {
provider = "postgresql"
url = env("DATABASE_URL")
}
generator client {
provider = "prisma-client-py"
recursive_type_depth = 5
interface = "asyncio"
previewFeatures = ["fullTextSearch"]
partial_type_generator = "market/utils/partial_types.py"
}
enum SubmissionStatus {
PENDING
APPROVED
REJECTED
}
model Agents {
id String @unique @default(dbgenerated("gen_random_uuid()")) @db.Uuid
version Int @default(1)
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
submissionDate DateTime @default(now())
submissionReviewDate DateTime?
submissionStatus SubmissionStatus @default(PENDING)
submissionReviewComments String?
name String?
description String?
author String?
keywords String[]
categories String[]
search Unsupported("tsvector")? @default(dbgenerated("''::tsvector"))
graph Json
AnalyticsTracker AnalyticsTracker[]
FeaturedAgent FeaturedAgent?
@@id(name: "graphVersionId", [id, version])
}
model AnalyticsTracker {
id String @id @unique @default(dbgenerated("gen_random_uuid()")) @db.Uuid
agentId String @unique @db.Uuid
agent Agents @relation(fields: [agentId], references: [id])
views Int
downloads Int
}
model FeaturedAgent {
id String @id @unique @default(dbgenerated("gen_random_uuid()")) @db.Uuid
agentId String @unique @db.Uuid
agent Agents @relation(fields: [agentId], references: [id])
is_featured Boolean @default(false)
category String @default("featured")
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
}
|