-
Notifications
You must be signed in to change notification settings - Fork 0
/
schema.prisma
45 lines (40 loc) · 1.2 KB
/
schema.prisma
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
37
38
39
40
41
42
43
44
45
// 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:./.dev/local.db"
}
model User {
id Int @id @default(autoincrement())
screenname String @unique
name String?
password String
createdAt DateTime @default(now()) @map("created_at")
lastSignedInAt DateTime @default(now()) @map("last_signed_in_at")
posts Post[]
}
model Post {
id Int @id @default(autoincrement())
title String
description String?
filename String
deletedFile Boolean @default(false)
postedBy DateTime @default(now())
published Boolean @default(false)
publishedBy DateTime?
updatedBy DateTime @updatedAt
author User @relation(fields: [authorId], references: [id])
authorId Int
}
model Upload {
cuid String @id @default(cuid())
filename String?
filesize Int @default(-1)
filehash String
startedAt DateTime @default(now()) @map("started_at")
//author User @relation(fields: [authorId], references: [id])
//authorId Int
}