Q2TG/prisma/schema.prisma

56 lines
1.2 KiB
Plaintext
Raw Normal View History

2022-02-15 10:06:36 +00:00
// 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 {
2022-02-20 08:25:30 +00:00
provider = "postgresql"
url = env("DATABASE_URL")
2022-02-15 10:06:36 +00:00
}
model Message {
2022-02-15 15:23:03 +00:00
id Int @id @default(autoincrement())
qqRoomId Int
qqSenderId Int
2022-02-15 10:06:36 +00:00
time DateTime
brief String
seq Int
rand Int
pktnum Int
2022-02-15 15:23:03 +00:00
tgChatId Int
tgMsgId Int
@@unique([qqRoomId, qqSenderId, seq, rand, pktnum])
@@unique([tgChatId, tgMsgId])
}
model ForwardPair {
id Int @id @default(autoincrement())
qqRoomId Int @unique
tgChatId Int @unique
}
model File {
id Int @id @default(autoincrement())
groupId Int
fileId String
info String
@@unique([groupId, fileId])
}
model FlashPhoto {
id Int @id @default(autoincrement())
photoMd5 String
2022-02-15 10:06:36 +00:00
}
2022-02-15 15:23:03 +00:00
model FlashPhotoView {
id Int @id @default(autoincrement())
flashPhotoId Int
viewerId Int
@@unique([flashPhotoId, viewerId])
}