Spaces:
Runtime error
Runtime error
Download prisma/schema.prisma from damndeepesh-dev/RippleWorkers: direct link, hf CLI and curl.
- Browser
- Download file 2.77 kB
-
https://huggingface.co/spaces/damndeepesh-dev/RippleWorkers/resolve/main/prisma/schema.prisma
- Command line
-
hf download hf://spaces/damndeepesh-dev/RippleWorkers/prisma/schema.prisma
-
curl -L -o schema.prisma https://huggingface.co/spaces/damndeepesh-dev/RippleWorkers/resolve/main/prisma/schema.prisma
2.77 kB
| generator client { | |
| provider = "prisma-client-js" | |
| } | |
| datasource db { | |
| provider = "postgresql" | |
| url = env("DATABASE_URL") | |
| } | |
| model User { | |
| id String (uuid()) | |
| email String | |
| image String? // Profile picture from Facebook | |
| createdAt DateTime (now()) | |
| updatedAt DateTime | |
| instagramAccounts InstagramAccount[] | |
| } | |
| model InstagramAccount { | |
| id String (uuid()) | |
| instagramUserId String // The Instagram Business Account ID | |
| username String? | |
| profilePictureUrl String? // Instagram Profile Picture | |
| accessToken String // Long-lived access token (encrypt in prod) | |
| tokenExpiresAt DateTime? | |
| userId String | |
| user User (fields: [userId], references: [id], onDelete: Cascade) | |
| posts Post[] | |
| createdAt DateTime (now()) | |
| updatedAt DateTime | |
| } | |
| model Post { | |
| id String (uuid()) | |
| caption String? | |
| mediaUrl String | |
| coverUrl String? // For Video/Reel covers | |
| mediaType String // IMAGE, VIDEO, CAROUSEL (SQLite treats enums as strings basically, keeping simple) | |
| scheduledAt DateTime? | |
| status String ("DRAFT") // DRAFT, SCHEDULED, PUBLISHED, FAILED | |
| instagramAccountId String | |
| instagramAccount InstagramAccount (fields: [instagramAccountId], references: [id], onDelete: Cascade) | |
| instagramMediaId String? // ID returned by Instagram after publishing | |
| createdAt DateTime (now()) | |
| updatedAt DateTime | |
| automations Automation[] | |
| } | |
| model Automation { | |
| id String (uuid()) | |
| isActive Boolean (false) | |
| postId String | |
| post Post (fields: [postId], references: [id], onDelete: Cascade) | |
| keywords AutomationKeyword[] | |
| replies AutomationReply[] | |
| triggerType String ("COMMENTS") // For future scalability (e.g. DMs) | |
| // DM Configuration | |
| dmMessage String? | |
| dmLinkUrl String? | |
| dmLinkText String? | |
| createdAt DateTime (now()) | |
| updatedAt DateTime | |
| } | |
| model AutomationKeyword { | |
| id String (uuid()) | |
| keyword String | |
| automationId String | |
| automation Automation (fields: [automationId], references: [id], onDelete: Cascade) | |
| } | |
| model AutomationReply { | |
| id String (uuid()) | |
| replyText String | |
| automationId String | |
| automation Automation (fields: [automationId], references: [id], onDelete: Cascade) | |
| } | |