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 "t_device_sync_cursors" }