summaryrefslogtreecommitdiff
path: root/prisma/schema.prisma
blob: c4d04d28085bf7cf14bc5a238bdb7163b4d3f893 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
// This is your Prisma schema file,
// learn more about it in the docs: https://pris.ly/d/prisma-schema

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

datasource db {
  provider = "sqlite"
  url      = "file:data.db"
}

model Image {
  id                 String   @id @unique @default(cuid())
  storage_id         String
  description        String?
  is_hidden          Boolean?
  burn_after_watched Boolean?
  ext                String
  view_count         Int?     @default(0)
  user               User?    @relation(fields: [userId], references: [id])
  userId             Int?
  timestamp          DateTime @default(now())
}

model User {
  id          Int      @id @default(autoincrement())
  alias_id    Int?     @unique
  key         String
  name        String
  desc        String?
  pic         String   @default("../img/default_avatar.png")
  pswd        String?
  is_supauser Boolean?
  Image       Image[]
}