Download libraries/nestjs-libraries/src/database/prisma/schema.prisma from Leon4gr45/postio: direct link, hf CLI and curl.
- Browser
- Download file 29.4 kB
-
https://huggingface.co/spaces/Leon4gr45/postio/resolve/main/libraries/nestjs-libraries/src/database/prisma/schema.prisma
- Command line
-
hf download hf://spaces/Leon4gr45/postio/libraries/nestjs-libraries/src/database/prisma/schema.prisma
-
curl -L -o schema.prisma https://huggingface.co/spaces/Leon4gr45/postio/resolve/main/libraries/nestjs-libraries/src/database/prisma/schema.prisma
29.4 kB
| generator client { | |
| provider = "prisma-client-js" | |
| runtime = "nodejs" | |
| } | |
| datasource db { | |
| provider = "postgresql" | |
| url = env("DATABASE_URL") | |
| } | |
| model Organization { | |
| id String | |
| name String | |
| description String? | |
| apiKey String? | |
| paymentId String? | |
| streakSince DateTime? | |
| createdAt DateTime | |
| updatedAt DateTime | |
| allowTrial Boolean | |
| isTrailing Boolean | |
| shortlink ShortLinkPreference | |
| autoPost AutoPost[] | |
| Comments Comments[] | |
| credits Credits[] | |
| customers Customer[] | |
| errors Errors[] | |
| github GitHub[] | |
| Integration Integration[] | |
| media Media[] | |
| buyerOrganization MessagesGroup[] | |
| notifications Notifications[] | |
| plugs Plugs[] | |
| post Post[] | |
| submittedPost Post[] | |
| sets Sets[] | |
| signatures Signatures[] | |
| subscription Subscription? | |
| tags Tags[] | |
| thirdParty ThirdParty[] | |
| usedCodes UsedCodes[] | |
| users UserOrganization[] | |
| webhooks Webhooks[] | |
| oauthApp OAuthApp[] | |
| oauthAuthorizations OAuthAuthorization[] | |
| @ | |
| @ | |
| @ | |
| } | |
| model Tags { | |
| id String | |
| name String | |
| color String | |
| orgId String | |
| deletedAt DateTime? | |
| createdAt DateTime | |
| updatedAt DateTime | |
| organization Organization | |
| posts TagsPosts[] | |
| @ | |
| @ | |
| } | |
| model TagsPosts { | |
| postId String | |
| tagId String | |
| createdAt DateTime | |
| updatedAt DateTime | |
| post Post | |
| tag Tags | |
| @ | |
| @ | |
| } | |
| model User { | |
| id String | |
| email String | |
| password String? | |
| providerName Provider | |
| name String? | |
| lastName String? | |
| isSuperAdmin Boolean | |
| bio String? | |
| audience Int | |
| pictureId String? | |
| providerId String? | |
| timezone Int | |
| createdAt DateTime | |
| updatedAt DateTime | |
| lastReadNotifications DateTime | |
| inviteId String? | |
| activated Boolean | |
| account String? | |
| connectedAccount Boolean | |
| lastOnline DateTime | |
| ip String? | |
| agent String? | |
| comments Comments[] | |
| items ItemUser[] | |
| groupBuyer MessagesGroup[] | |
| groupSeller MessagesGroup[] | |
| orderBuyer Orders[] | |
| orderSeller Orders[] | |
| payoutProblems PayoutProblems[] | |
| agencies SocialMediaAgency? | |
| picture Media? | |
| organizations UserOrganization[] | |
| sendSuccessEmails Boolean | |
| sendFailureEmails Boolean | |
| sendStreakEmails Boolean | |
| oauthAuthorizations OAuthAuthorization[] | |
| @ | |
| @ | |
| @ | |
| @ | |
| @ | |
| @ | |
| } | |
| model UsedCodes { | |
| id String | |
| code String | |
| orgId String | |
| createdAt DateTime | |
| updatedAt DateTime | |
| organization Organization | |
| @ | |
| } | |
| model UserOrganization { | |
| id String | |
| userId String | |
| organizationId String | |
| disabled Boolean | |
| role Role | |
| createdAt DateTime | |
| updatedAt DateTime | |
| organization Organization | |
| user User | |
| @ | |
| @ | |
| } | |
| model GitHub { | |
| id String | |
| login String? | |
| name String? | |
| token String | |
| jobId String? | |
| organizationId String | |
| createdAt DateTime | |
| updatedAt DateTime | |
| organization Organization | |
| @ | |
| @ | |
| } | |
| model Trending { | |
| id String | |
| trendingList String | |
| language String? | |
| hash String | |
| date DateTime | |
| createdAt DateTime | |
| updatedAt DateTime | |
| @ | |
| } | |
| model TrendingLog { | |
| id String | |
| language String? | |
| date DateTime | |
| } | |
| model ItemUser { | |
| id String | |
| userId String | |
| key String | |
| user User | |
| @ | |
| @ | |
| @ | |
| } | |
| model Star { | |
| id String | |
| stars Int | |
| totalStars Int | |
| forks Int | |
| totalForks Int | |
| login String | |
| date DateTime .Date | |
| createdAt DateTime | |
| updatedAt DateTime | |
| @ | |
| } | |
| model Media { | |
| id String | |
| name String | |
| originalName String? | |
| path String | |
| organizationId String | |
| createdAt DateTime | |
| updatedAt DateTime | |
| deletedAt DateTime? | |
| fileSize Int | |
| type String | |
| thumbnail String? | |
| alt String? | |
| thumbnailTimestamp Int? | |
| organization Organization | |
| agencies SocialMediaAgency[] | |
| userPicture User[] | |
| oauthApps OAuthApp[] | |
| @ | |
| @ | |
| @ | |
| } | |
| model SocialMediaAgency { | |
| id String | |
| userId String | |
| name String | |
| logoId String? | |
| website String? | |
| slug String? | |
| facebook String? | |
| instagram String? | |
| twitter String? | |
| linkedIn String? | |
| youtube String? | |
| tiktok String? | |
| otherSocialMedia String? | |
| shortDescription String | |
| description String | |
| approved Boolean | |
| createdAt DateTime | |
| updatedAt DateTime | |
| deletedAt DateTime? | |
| logo Media? | |
| user User | |
| niches SocialMediaAgencyNiche[] | |
| @ | |
| @ | |
| @ | |
| } | |
| model SocialMediaAgencyNiche { | |
| agencyId String | |
| niche String | |
| agency SocialMediaAgency | |
| @ | |
| } | |
| model Credits { | |
| id String | |
| organizationId String | |
| credits Int | |
| createdAt DateTime | |
| updatedAt DateTime | |
| type String | |
| organization Organization | |
| @ | |
| @ | |
| } | |
| model Subscription { | |
| id String | |
| organizationId String | |
| subscriptionTier SubscriptionTier | |
| identifier String? | |
| cancelAt DateTime? | |
| period Period | |
| totalChannels Int | |
| isLifetime Boolean | |
| createdAt DateTime | |
| updatedAt DateTime | |
| deletedAt DateTime? | |
| organization Organization | |
| @ | |
| @ | |
| } | |
| model Customer { | |
| id String | |
| name String | |
| orgId String | |
| createdAt DateTime | |
| updatedAt DateTime | |
| deletedAt DateTime? | |
| organization Organization | |
| integrations Integration[] | |
| @ | |
| } | |
| model Integration { | |
| id String | |
| internalId String | |
| organizationId String | |
| name String | |
| picture String? | |
| providerIdentifier String | |
| type String | |
| token String | |
| disabled Boolean | |
| tokenExpiration DateTime? | |
| refreshToken String? | |
| profile String? | |
| deletedAt DateTime? | |
| createdAt DateTime | |
| updatedAt DateTime? | |
| inBetweenSteps Boolean | |
| refreshNeeded Boolean | |
| postingTimes String | |
| customInstanceDetails String? | |
| customerId String? | |
| rootInternalId String? | |
| additionalSettings String? | |
| exisingPlugData ExisingPlugData[] | |
| customer Customer? | |
| organization Organization | |
| webhooks IntegrationsWebhooks[] | |
| orderItems OrderItems[] | |
| plugs Plugs[] | |
| posts Post[] | |
| @ | |
| @ | |
| @ | |
| @ | |
| @ | |
| @ | |
| @ | |
| @ | |
| @ | |
| @ | |
| @ | |
| } | |
| model Signatures { | |
| id String | |
| organizationId String | |
| content String | |
| autoAdd Boolean | |
| createdAt DateTime | |
| updatedAt DateTime | |
| deletedAt DateTime? | |
| organization Organization | |
| @ | |
| @ | |
| @ | |
| } | |
| model Comments { | |
| id String | |
| content String | |
| organizationId String | |
| postId String | |
| userId String | |
| createdAt DateTime | |
| updatedAt DateTime | |
| deletedAt DateTime? | |
| organization Organization | |
| post Post | |
| user User | |
| @ | |
| @ | |
| @ | |
| @ | |
| @ | |
| } | |
| model Post { | |
| id String | |
| state State | |
| publishDate DateTime | |
| organizationId String | |
| integrationId String | |
| content String | |
| delay Int | |
| group String | |
| title String? | |
| description String? | |
| parentPostId String? | |
| releaseId String? | |
| releaseURL String? | |
| settings String? | |
| image String? | |
| submittedForOrderId String? | |
| submittedForOrganizationId String? | |
| approvedSubmitForOrder APPROVED_SUBMIT_FOR_ORDER | |
| creationMethod CreationMethod | |
| lastMessageId String? | |
| intervalInDays Int? | |
| error String? | |
| createdAt DateTime | |
| updatedAt DateTime | |
| deletedAt DateTime? | |
| comments Comments[] | |
| errors Errors[] | |
| payoutProblems PayoutProblems[] | |
| integration Integration | |
| lastMessage Messages? | |
| organization Organization | |
| parentPost Post? | |
| childrenPost Post[] | |
| submittedForOrder Orders? | |
| submittedForOrganization Organization? | |
| tags TagsPosts[] | |
| @ | |
| @ | |
| @ | |
| @ | |
| @ | |
| @ | |
| @ | |
| @ | |
| @ | |
| @ | |
| @ | |
| @ | |
| @ | |
| @ | |
| @ | |
| } | |
| model Notifications { | |
| id String | |
| organizationId String | |
| content String | |
| link String? | |
| createdAt DateTime | |
| updatedAt DateTime | |
| deletedAt DateTime? | |
| organization Organization | |
| @ | |
| @ | |
| @ | |
| } | |
| model MessagesGroup { | |
| id String | |
| buyerOrganizationId String | |
| buyerId String | |
| sellerId String | |
| createdAt DateTime | |
| updatedAt DateTime | |
| messages Messages[] | |
| buyer User | |
| buyerOrganization Organization | |
| seller User | |
| orders Orders[] | |
| @ | |
| @ | |
| @ | |
| @ | |
| } | |
| model PayoutProblems { | |
| id String | |
| status String | |
| orderId String | |
| userId String | |
| postId String? | |
| amount Int | |
| createdAt DateTime | |
| updatedAt DateTime | |
| order Orders | |
| post Post? | |
| user User | |
| } | |
| model Orders { | |
| id String | |
| buyerId String | |
| sellerId String | |
| status OrderStatus | |
| messageGroupId String | |
| captureId String? | |
| createdAt DateTime | |
| updatedAt DateTime | |
| ordersItems OrderItems[] | |
| buyer User | |
| messageGroup MessagesGroup | |
| seller User | |
| payoutProblems PayoutProblems[] | |
| posts Post[] | |
| @ | |
| @ | |
| @ | |
| @ | |
| @ | |
| } | |
| model OrderItems { | |
| id String | |
| orderId String | |
| integrationId String | |
| quantity Int | |
| price Int | |
| integration Integration | |
| order Orders | |
| @ | |
| @ | |
| } | |
| model Messages { | |
| id String | |
| from From | |
| content String? | |
| groupId String | |
| special String? | |
| createdAt DateTime | |
| updatedAt DateTime | |
| deletedAt DateTime? | |
| group MessagesGroup | |
| posts Post[] | |
| @ | |
| @ | |
| @ | |
| } | |
| model Plugs { | |
| id String | |
| organizationId String | |
| plugFunction String | |
| data String | |
| integrationId String | |
| activated Boolean | |
| integration Integration | |
| organization Organization | |
| @ | |
| @ | |
| } | |
| model ExisingPlugData { | |
| id String | |
| integrationId String | |
| methodName String | |
| value String | |
| integration Integration | |
| @ | |
| } | |
| model PopularPosts { | |
| id String | |
| category String | |
| topic String | |
| content String | |
| hook String | |
| createdAt DateTime | |
| updatedAt DateTime | |
| } | |
| model IntegrationsWebhooks { | |
| integrationId String | |
| webhookId String | |
| integration Integration | |
| webhook Webhooks | |
| @ | |
| @ | |
| @ | |
| @ | |
| } | |
| model Webhooks { | |
| id String | |
| name String | |
| organizationId String | |
| url String | |
| deletedAt DateTime? | |
| createdAt DateTime | |
| updatedAt DateTime | |
| integrations IntegrationsWebhooks[] | |
| organization Organization | |
| @ | |
| @ | |
| } | |
| model AutoPost { | |
| id String | |
| organizationId String | |
| title String | |
| content String? | |
| onSlot Boolean | |
| syncLast Boolean | |
| url String | |
| lastUrl String | |
| active Boolean | |
| addPicture Boolean | |
| generateContent Boolean | |
| integrations String | |
| deletedAt DateTime? | |
| createdAt DateTime | |
| updatedAt DateTime | |
| organization Organization | |
| @ | |
| } | |
| model Sets { | |
| id String | |
| organizationId String | |
| name String | |
| content String | |
| createdAt DateTime | |
| updatedAt DateTime | |
| organization Organization | |
| @ | |
| } | |
| model ThirdParty { | |
| id String | |
| organizationId String | |
| identifier String | |
| name String | |
| internalId String | |
| apiKey String | |
| createdAt DateTime | |
| updatedAt DateTime | |
| deletedAt DateTime? | |
| organization Organization | |
| @ | |
| @ | |
| @ | |
| } | |
| model Errors { | |
| id String | |
| message String | |
| platform String | |
| organizationId String | |
| createdAt DateTime | |
| updatedAt DateTime | |
| postId String | |
| body String | |
| organization Organization | |
| post Post | |
| @ | |
| @ | |
| } | |
| model Mentions { | |
| name String | |
| username String | |
| platform String | |
| createdAt DateTime | |
| updatedAt DateTime | |
| image String | |
| @ | |
| @ | |
| } | |
| /// The underlying table does not contain a valid unique identifier and can therefore currently not be handled by Prisma Client. | |
| model mastra_ai_spans { | |
| traceId String | |
| spanId String | |
| parentSpanId String? | |
| name String | |
| scope Json? | |
| spanType String | |
| attributes Json? | |
| metadata Json? | |
| links Json? | |
| input Json? | |
| output Json? | |
| error Json? | |
| startedAt DateTime .Timestamp(6) | |
| endedAt DateTime? .Timestamp(6) | |
| createdAt DateTime .Timestamp(6) | |
| updatedAt DateTime? .Timestamp(6) | |
| isEvent Boolean | |
| startedAtZ DateTime? .Timestamptz(6) | |
| endedAtZ DateTime? .Timestamptz(6) | |
| createdAtZ DateTime? .Timestamptz(6) | |
| updatedAtZ DateTime? .Timestamptz(6) | |
| @ | |
| @ | |
| @ | |
| @ | |
| @ | |
| } | |
| /// The underlying table does not contain a valid unique identifier and can therefore currently not be handled by Prisma Client. | |
| model mastra_evals { | |
| input String | |
| output String | |
| result Json | |
| agent_name String | |
| metric_name String | |
| instructions String | |
| test_info Json? | |
| global_run_id String | |
| run_id String | |
| created_at DateTime .Timestamp(6) | |
| createdAt DateTime? .Timestamp(6) | |
| created_atZ DateTime? .Timestamptz(6) | |
| createdAtZ DateTime? .Timestamptz(6) | |
| @ | |
| @ | |
| } | |
| model mastra_messages { | |
| id String | |
| thread_id String | |
| content String | |
| role String | |
| type String | |
| createdAt DateTime .Timestamp(6) | |
| resourceId String? | |
| createdAtZ DateTime? .Timestamptz(6) | |
| @ | |
| } | |
| model mastra_resources { | |
| id String | |
| workingMemory String? | |
| metadata Json? | |
| createdAt DateTime .Timestamp(6) | |
| updatedAt DateTime .Timestamp(6) | |
| createdAtZ DateTime? .Timestamptz(6) | |
| updatedAtZ DateTime? .Timestamptz(6) | |
| } | |
| model mastra_scorers { | |
| id String | |
| scorerId String | |
| traceId String? | |
| runId String | |
| scorer Json | |
| preprocessStepResult Json? | |
| extractStepResult Json? | |
| analyzeStepResult Json? | |
| score Float | |
| reason String? | |
| metadata Json? | |
| preprocessPrompt String? | |
| extractPrompt String? | |
| generateScorePrompt String? | |
| generateReasonPrompt String? | |
| analyzePrompt String? | |
| reasonPrompt String? | |
| input Json | |
| output Json | |
| additionalContext Json? | |
| runtimeContext Json? | |
| entityType String? | |
| entity Json? | |
| entityId String? | |
| source String | |
| resourceId String? | |
| threadId String? | |
| createdAt DateTime .Timestamp(6) | |
| updatedAt DateTime .Timestamp(6) | |
| createdAtZ DateTime? .Timestamptz(6) | |
| updatedAtZ DateTime? .Timestamptz(6) | |
| spanId String? | |
| @ | |
| } | |
| model mastra_threads { | |
| id String | |
| resourceId String | |
| title String | |
| metadata String? | |
| createdAt DateTime .Timestamp(6) | |
| updatedAt DateTime .Timestamp(6) | |
| createdAtZ DateTime? .Timestamptz(6) | |
| updatedAtZ DateTime? .Timestamptz(6) | |
| @ | |
| } | |
| model mastra_traces { | |
| id String | |
| parentSpanId String? | |
| name String | |
| traceId String | |
| scope String | |
| kind Int | |
| attributes Json? | |
| status Json? | |
| events Json? | |
| links Json? | |
| other String? | |
| startTime BigInt | |
| endTime BigInt | |
| createdAt DateTime .Timestamp(6) | |
| createdAtZ DateTime? .Timestamptz(6) | |
| @ | |
| } | |
| model mastra_workflow_snapshot { | |
| workflow_name String | |
| run_id String | |
| resourceId String? | |
| snapshot String | |
| createdAt DateTime .Timestamp(6) | |
| updatedAt DateTime .Timestamp(6) | |
| createdAtZ DateTime? .Timestamptz(6) | |
| updatedAtZ DateTime? .Timestamptz(6) | |
| @ | |
| } | |
| model OAuthApp { | |
| id String | |
| organizationId String | |
| name String | |
| description String? | |
| pictureId String? | |
| redirectUrl String | |
| clientId String | |
| clientSecret String | |
| createdAt DateTime | |
| updatedAt DateTime | |
| deletedAt DateTime? | |
| organization Organization | |
| picture Media? | |
| authorizations OAuthAuthorization[] | |
| @ | |
| @ | |
| @ | |
| @ | |
| } | |
| model OAuthAuthorization { | |
| id String | |
| oauthAppId String | |
| userId String | |
| organizationId String | |
| accessToken String? | |
| authorizationCode String? | |
| codeExpiresAt DateTime? | |
| revokedAt DateTime? | |
| createdAt DateTime | |
| updatedAt DateTime | |
| oauthApp OAuthApp | |
| user User | |
| organization Organization | |
| @ | |
| @ | |
| @ | |
| @ | |
| @ | |
| @ | |
| @ | |
| } | |
| enum OrderStatus { | |
| PENDING | |
| ACCEPTED | |
| CANCELED | |
| COMPLETED | |
| } | |
| enum From { | |
| BUYER | |
| SELLER | |
| } | |
| enum State { | |
| QUEUE | |
| PUBLISHED | |
| ERROR | |
| DRAFT | |
| } | |
| enum SubscriptionTier { | |
| STANDARD | |
| PRO | |
| TEAM | |
| ULTIMATE | |
| } | |
| enum Period { | |
| MONTHLY | |
| YEARLY | |
| } | |
| enum Provider { | |
| LOCAL | |
| GITHUB | |
| FARCASTER | |
| WALLET | |
| GENERIC | |
| } | |
| enum Role { | |
| SUPERADMIN | |
| ADMIN | |
| USER | |
| } | |
| enum APPROVED_SUBMIT_FOR_ORDER { | |
| NO | |
| WAITING_CONFIRMATION | |
| YES | |
| } | |
| enum CreationMethod { | |
| UNKNOWN | |
| WEB | |
| MCP | |
| API | |
| AUTOPOST | |
| CLI | |
| } | |
| enum ShortLinkPreference { | |
| ASK | |
| YES | |
| NO | |
| } | |
| enum AnnouncementColor { | |
| INFO | |
| WARNING | |
| ERROR | |
| } | |
| model Announcement { | |
| id String | |
| title String | |
| description String | |
| color AnnouncementColor | |
| createdAt DateTime | |
| } | |