ChatbotX icon indicating copy to clipboard operation
ChatbotX copied to clipboard

sass model

Open realcodesiman opened this issue 1 year ago • 0 comments

Database

generator client {
  provider        = "prisma-client-js"
}

datasource db {
  provider = "postgresql"
  url      = env("DATABASE_URL")
}

model Workspace {
  id     String @id @default(cuid(2))
  name   String
  domain String @unique

  workspaceBilling WorkspaceBilling[]
  workspaceUsage        WorkspaceUsage?
}

model WorkspaceSubscriptionModel {
  id          String @id @default(cuid(2))
  name        String
  priceId     String
  maxContacts Int

  createdAt DateTime @default(now())
  updatedAt DateTime @updatedAt
}

model WorkspaceBilling {
  id          String    @id @default(cuid(2))
  workspaceId String
  workspace   Workspace @relation(fields: [workspaceId], references: [id])
  maxContacts Int
  paddleCustomerId String
  paddleSubscriptionId String
  paddleSubscriptionStatus String

  createdAt DateTime @default(now())
  updatedAt DateTime @updatedAt
}

model WorkspaceUsage {
  id          String    @id @default(cuid(2))
  workspaceId String    @unique
  workspace   Workspace @relation(fields: [workspaceId], references: [id])
  maxContacts Int  max = 100
  currentContacts Int init = 0

  createdAt DateTime @default(now())
  updatedAt DateTime @updatedAt
}

realcodesiman avatar Mar 18 '25 14:03 realcodesiman