feat(conversations): add notification mute functionality for conversations
- Rename Muted field to NotificationMuted across model, DTOs and converters - Add UpdateNotificationMuted repository method with upsert support - Add SetConversationNotificationMuted service method - Add PUT /:id/notification_muted route for setting mute status - Improve S3 storage resilience by skipping bucket check on access denied
This commit is contained in:
@@ -56,7 +56,7 @@ type ConversationParticipant struct {
|
||||
ConversationID string `gorm:"not null;size:20;uniqueIndex:idx_conversation_user,priority:1;index:idx_cp_conversation_user,priority:1" json:"conversation_id"` // 雪花算法ID(string类型)
|
||||
UserID string `gorm:"column:user_id;type:varchar(50);not null;uniqueIndex:idx_conversation_user,priority:2;index:idx_cp_conversation_user,priority:2;index:idx_cp_user_hidden_pinned_updated,priority:1" json:"user_id"` // UUID格式,与JWT中user_id保持一致
|
||||
LastReadSeq int64 `gorm:"default:0" json:"last_read_seq"` // 已读到的seq位置
|
||||
Muted bool `gorm:"default:false" json:"muted"` // 是否免打扰
|
||||
NotificationMuted bool `gorm:"column:muted;default:false" json:"notification_muted"` // 是否免打扰
|
||||
IsPinned bool `gorm:"default:false;index:idx_cp_user_hidden_pinned_updated,priority:3" json:"is_pinned"` // 是否置顶会话(用户维度)
|
||||
HiddenAt *time.Time `gorm:"index:idx_cp_user_hidden_pinned_updated,priority:2" json:"hidden_at,omitempty"` // 仅自己删除会话时使用,收到新消息后自动恢复
|
||||
CreatedAt time.Time `json:"created_at" gorm:"autoCreateTime"`
|
||||
|
||||
Reference in New Issue
Block a user