spark-server/internal/module/conversation/model/p2p_conversation.go
2026-09-23 17:11:56 +08:00

12 lines
615 B
Go
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

package model
// P2PConversation maps table p2p_conversations.
type P2PConversation struct {
ID int64 `gorm:"column:id;primaryKey;autoIncrement;comment:行 id,表内自增,仅内部用;业务唯一键是 (user_small, user_big)"`
UserSmall int64 `gorm:"column:user_small;comment:两人中较小的 user_id,保证同一对用户只有一行"`
UserBig int64 `gorm:"column:user_big;comment:两人中较大的 user_id"`
ConversationID int64 `gorm:"column:conversation_id;comment:对应 conversations.id"`
}
func (P2PConversation) TableName() string { return "t_p2p_conversations" }