Q2TG/prisma/schema.prisma

56 lines
1.2 KiB
Plaintext

// 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 = "postgresql"
url = env("DATABASE_URL")
}
model Message {
id Int @id @default(autoincrement())
qqRoomId Int
qqSenderId Int
time DateTime
brief String
seq Int
rand Int
pktnum Int
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
}
model FlashPhotoView {
id Int @id @default(autoincrement())
flashPhotoId Int
viewerId Int
@@unique([flashPhotoId, viewerId])
}