spark-server/internal/module/conversation/model/conversation.go
zhr ae9a71034d feat: implement Spark IM V3 modular monolith
Add HTTP /v1 MVC, TCP send path, groups with server-side member-avatar collage, object-storage upload, and friends/favorites around the architecture-v3 layout.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-17 19:52:11 +08:00

16 lines
692 B
Go
Raw 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 is conversation persistence. One file per table.
package model
import "time"
// Conversation maps table conversations.
type Conversation struct {
ID int64 `gorm:"column:id;primaryKey;comment:Snowflake 会话 id,时间有序主键"`
Type int `gorm:"column:type;comment:会话类型:1=单聊 2=群聊"`
LastMsgID int64 `gorm:"column:last_msg_id;comment:最新消息 Snowflake id,0 表示尚无消息"`
LastMsgAt time.Time `gorm:"column:last_msg_at;comment:最新消息时间(毫秒精度)"`
CreatedAt time.Time `gorm:"column:created_at;comment:会话创建时间"`
}
func (Conversation) TableName() string { return "conversations" }