diff --git a/.gitignore b/.gitignore index e6f47dd..22adafb 100644 --- a/.gitignore +++ b/.gitignore @@ -19,9 +19,6 @@ test/ *.log.* *.sig -pkg/ -src/ - ### VisualStudio template ## Ignore Visual Studio temporary files, build results, and ## files generated by popular Visual Studio add-ons. diff --git a/prisma/schema.prisma b/prisma/schema.prisma index 72d1675..6707e12 100644 --- a/prisma/schema.prisma +++ b/prisma/schema.prisma @@ -11,13 +11,45 @@ datasource db { } model Message { - id Int @id @default(autoincrement()) - roomId Int - senderId Int + 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]) +}