Skip to content

50+ open-source generative AI apps you can clone, deploy, and monetize — image generators, video tools, virtual try-ons, AI SaaS templates, and platform integrations. One-click Vercel deploy on every template.

2.3 KB
Raw Blame
generator client {
  provider      = "prisma-client-js"
  binaryTargets = ["native", "rhel-openssl-1.0.x", "rhel-openssl-3.0.x"]
}

datasource db {
  provider  = "postgresql"
}

model Account {
  id                 String  @id @default(cuid())
  userId             String
  type               String
  provider           String
  providerAccountId  String
  refresh_token      String?  @db.Text
  access_token       String?  @db.Text
  expires_at         Int?
  token_type         String?
  scope              String?
  id_token           String?  @db.Text
  session_state      String?

  user User @relation(fields: [userId], references: [id], onDelete: Cascade)

  @@unique([provider, providerAccountId])
}

model Session {
  id           String   @id @default(cuid())
  sessionToken String   @unique
  userId       String
  expires      DateTime
  user         User     @relation(fields: [userId], references: [id], onDelete: Cascade)
}

model User {
  id            String             @id @default(cuid())
  name          String?
  email         String?            @unique
  emailVerified DateTime?
  image         String?
  credits       Int                @default(10)
  accounts      Account[]
  sessions      Session[]
  cards         BusinessCard[]
}

model BusinessCard {
  id              String   @id @default(cuid())
  name            String
  title           String
  company         String
  address         String?
  phone           String?
  email           String?
  website         String?
  bio             String?  @db.Text
  avatar          String?  @db.Text
  backgroundImage String?  @db.Text
  socialLinks     String   @db.Text // JSON string of social media links: { github, linkedin, twitter, facebook, instagram, youtube }
  showAiAssistant Boolean  @default(true)
  templateId      String   @default("classic")
  htmlContent     String?  @db.Text // Custom generated HTML design from AI
  urlHash         String   @unique
  userPrompt      String?  @db.Text
  createTime      DateTime @default(now())
  updateTime      DateTime @updatedAt
  userId          String
  user            User     @relation(fields: [userId], references: [id], onDelete: Cascade)
}

model VerificationToken {
  identifier String
  token      String   @unique
  expires    DateTime

  @@unique([identifier, token])
}