Spaces:
Paused
Paused
Download apps/prevision-api/prisma/schema.prisma from modventures/prevision: direct link, hf CLI and curl.
- Browser
- Download file 4.31 kB
-
https://huggingface.co/spaces/modventures/prevision/resolve/main/apps/prevision-api/prisma/schema.prisma
- Command line
-
hf download hf://spaces/modventures/prevision/apps/prevision-api/prisma/schema.prisma
-
curl -L -o schema.prisma https://huggingface.co/spaces/modventures/prevision/resolve/main/apps/prevision-api/prisma/schema.prisma
4.31 kB
| generator client { | |
| provider = "prisma-client" | |
| output = "../src/generated/prisma" | |
| moduleFormat = "esm" | |
| } | |
| datasource db { | |
| provider = "postgresql" | |
| } | |
| enum UserRole { | |
| user | |
| admin | |
| @ | |
| } | |
| model User { | |
| id String .Uuid | |
| clerkUserId String .VarChar(64) | |
| email String .VarChar(255) | |
| name String? .VarChar(255) | |
| /// Admins have unlimited generations. Set with `pnpm user:role <email> admin`. | |
| role UserRole | |
| stripeCustomerId String? .VarChar(64) | |
| createdAt DateTime .Timestamptz | |
| updatedAt DateTime .Timestamptz | |
| deletedAt DateTime? .Timestamptz | |
| generations Generation[] | |
| subscriptions Subscription[] | |
| @ | |
| } | |
| enum SubscriptionPlan { | |
| starter | |
| growth | |
| @ | |
| } | |
| /// Mirrors Stripe's subscription statuses. | |
| enum SubscriptionStatus { | |
| incomplete | |
| incomplete_expired | |
| trialing | |
| active | |
| past_due | |
| canceled | |
| unpaid | |
| paused | |
| @ | |
| } | |
| /// A Stripe subscription, kept in sync by the Stripe webhook. Rows are never deleted. | |
| model Subscription { | |
| id String .Uuid | |
| userId String .Uuid | |
| user User | |
| stripeSubscriptionId String .VarChar(64) | |
| stripePriceId String .VarChar(64) | |
| plan SubscriptionPlan | |
| status SubscriptionStatus | |
| currentPeriodStart DateTime .Timestamptz | |
| currentPeriodEnd DateTime .Timestamptz | |
| cancelAtPeriodEnd Boolean | |
| createdAt DateTime .Timestamptz | |
| updatedAt DateTime .Timestamptz | |
| @ | |
| @ | |
| } | |
| /// One room visualization the renderer accepted. Tries used = rows without refundedAt. | |
| model Generation { | |
| id String .Uuid | |
| userId String .Uuid | |
| user User | |
| jobId String .VarChar(64) | |
| refundedAt DateTime? .Timestamptz | |
| createdAt DateTime .Timestamptz | |
| @ | |
| @ | |
| } | |
| /// Who may see a tile. `admin` tiles (such as supplier catalogs imported for testing) are hidden from clients. | |
| enum TileVisibility { | |
| public | |
| admin | |
| @ | |
| } | |
| /// The studio's material library: the shared demo tiles, seeded from prisma/catalog.json, | |
| /// plus admin-only supplier catalogs imported explicitly (see docs/DEPLOYMENT.md). | |
| model Tile { | |
| id String .Uuid | |
| slug String .VarChar(120) | |
| name String .VarChar(255) | |
| collection String? .VarChar(120) | |
| brand String? .VarChar(120) | |
| /// The organization that owns the supplier catalog this tile came from. | |
| organization String? .VarChar(120) | |
| visibility TileVisibility | |
| surfaces String[] .VarChar(20) | |
| widthMm Int? | |
| heightMm Int? | |
| imageUrl String .VarChar(1024) | |
| thumbnailUrl String? .VarChar(1024) | |
| assets Json | |
| render Json | |
| position Int? | |
| createdAt DateTime .Timestamptz | |
| updatedAt DateTime .Timestamptz | |
| deletedAt DateTime? .Timestamptz | |
| @ | |
| @ | |
| @ | |
| } | |