mirror of
https://github.com/shumaiOne/shumai.git
synced 2026-12-05 15:44:28 +00:00
feat(comment): add emoji reaction support for comments (#405)
* feat(comment): add emoji reaction support for comments * fix(webui): adjust emoji picker trigger icon size to match mark-done icon * fix(webui): prevent search icon and placeholder overlap in emoji picker * fix(webui): use normal text color for reaction count * feat(db): limit comment reaction code column to VarChar(32)
This commit is contained in:
@@ -218,6 +218,7 @@ model User {
|
||||
teamMembers TeamMember[] @relation("UserToTeamMember")
|
||||
comments AssetComment[] @relation("UserToAssetComment")
|
||||
completionChangedComments AssetComment[] @relation("UserToAssetCommentCompletionChanged")
|
||||
commentReactions AssetCommentReaction[] @relation("UserToAssetCommentReaction")
|
||||
createdInvites Invite[] @relation("UserToInvite")
|
||||
createdNotifications Notification[] @relation("UserToCreatedNotification")
|
||||
notifications Notification[] @relation("UserToNotification")
|
||||
@@ -656,6 +657,7 @@ model AssetComment {
|
||||
replies AssetComment[] @relation("CommentReplies")
|
||||
|
||||
attachments AssetCommentAttachment[] @relation("CommentToAttachment")
|
||||
reactions AssetCommentReaction[] @relation("CommentToReaction")
|
||||
|
||||
@@index([assetId])
|
||||
@@map("asset_comments")
|
||||
@@ -675,6 +677,23 @@ model AssetCommentAttachment {
|
||||
@@map("asset_comment_attachments")
|
||||
}
|
||||
|
||||
model AssetCommentReaction {
|
||||
id String @id @default(ulid())
|
||||
createdAt DateTime @default(now()) @map("created_at")
|
||||
|
||||
commentId String @map("comment_id")
|
||||
comment AssetComment @relation("CommentToReaction", fields: [commentId], references: [id], onDelete: Cascade)
|
||||
|
||||
userId String @map("user_id")
|
||||
user User @relation("UserToAssetCommentReaction", fields: [userId], references: [id], onDelete: Cascade)
|
||||
|
||||
code String @db.VarChar(32)
|
||||
|
||||
@@unique([commentId, userId, code])
|
||||
@@index([commentId])
|
||||
@@map("asset_comment_reactions")
|
||||
}
|
||||
|
||||
model AssetEmbedding {
|
||||
id String @id @default(ulid())
|
||||
embedding Unsupported("vector(1536)")?
|
||||
|
||||
Reference in New Issue
Block a user