Skip to content
Snippets Groups Projects
schema.prisma 2.86 KiB
Newer Older
// This is your Prisma schema file,
// learn more about it in the docs: https://pris.ly/d/prisma-schema

// Looking for ways to speed up your queries, or scale easily with your serverless or edge functions?
// Try Prisma Accelerate: https://pris.ly/cli/accelerate-init

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

datasource db {
  provider = "postgresql"
  url      = env("DATABASE_URL")
  // при запуске с рабочего ноутбука
malyusgun's avatar
malyusgun committed
  // directUrl = env("DIRECT_URL")
  user_uuid     String        @id @default(uuid())
  nick_name     String        @unique
  password      String
  email         String
  first_name    String?
  middle_name   String?
  last_name     String?
  settings      Json?
  pages_uuid    Json?
}

model Page {
  user_uuid             String
  page_uuid             String @id @default(uuid())
  page_title            String
  page_icon             String
  page_navigation_order String
  background_path       String? @db.Text
  page_entities         Json?
}

model Entity {
  entity_uuid           String @id @default(uuid())
  entity_order          Int    @default(autoincrement())
  entity_type           String
  title                 String?
  text                  String? @db.Text
  font_size             String?
  paragraph_size        String?
  text_position         String?
  image_path            String? @db.Text
  image_width           Int?
  file_width            Int?
  file_height           Int?
  entity_position       String?
  entity_title_position String?
  image_scale           String?
  table_columns         Json?
  table_data            Json?
}

model Divider {
  entity_type           String
  entity_uuid           String @id @default(uuid())
  entity_order          Int
  divider_height        Int?
  divider_type          String?
}

model Paragraph {
  entity_type           String
  entity_uuid           String @id @default(uuid())
  entity_order          Int
  title                 String?
  text                  String? @db.Text
  font_size             String?
  paragraph_size        String?
  entity_position       String?
  entity_title_position String?
model Image {
  entity_type           String
  entity_uuid           String @id @default(uuid())
  entity_order          Int
  image_path            String? @db.Text
  image_url_initial     String?
  image_width_initial   Int
  file_width_initial    Int
  file_height_initial   Int
  file_width            Int?
  file_height           Int?
  image_scale           String?
  title                 String?
  text                  String? @db.Text
  font_size             String?
  paragraph_size        String?
  entity_title_position String?
  text_position         String?
  entity_position       String?
// model Setting {
//   setting_uuid  String @id @default(uuid())
//   setting_name  String @unique
//   setting_value String
// }