spark-server/internal/module/sync/model/device_sync_cursor.go
2026-09-20 11:38:27 +08:00

16 lines
749 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
import "time"
// DeviceSyncCursor maps table device_sync_cursors.
type DeviceSyncCursor struct {
ID int64 `gorm:"column:id;primaryKey;autoIncrement;comment:行 id,表内自增,仅内部用;业务唯一键是 (user_id, device_id)"`
UserID int64 `gorm:"column:user_id;comment:用户 id"`
DeviceID int64 `gorm:"column:device_id;comment:设备 id"`
MailboxSeq int64 `gorm:"column:mailbox_seq;comment:该设备已同步到的 mailbox_events.seq"`
DialogScore int64 `gorm:"column:dialog_score;comment:会话列表 Redis ZSET 游标"`
UpdatedAt time.Time `gorm:"column:updated_at;comment:游标更新时间"`
}
func (DeviceSyncCursor) TableName() string { return "device_sync_cursors" }