Update RabbitMQ config and eventbus. Improve secret filter logging. Refine presence, cloud, and social services. Update announcement and feature flag handlers. Add track_likes updated_at migration. Rebuild seed binary. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
24 lines
891 B
Go
24 lines
891 B
Go
package models
|
|
|
|
import (
|
|
"time"
|
|
|
|
"github.com/google/uuid"
|
|
)
|
|
|
|
// UserPresence represents a user's online status (v0.301 Lot P1, v0.302 P2)
|
|
type UserPresence struct {
|
|
UserID uuid.UUID `gorm:"type:uuid;primaryKey" json:"user_id"`
|
|
Status string `gorm:"type:varchar(20);not null;default:'offline'" json:"status"` // online, away, busy, offline
|
|
LastSeenAt time.Time `gorm:"not null" json:"last_seen_at"`
|
|
StatusMsg string `gorm:"column:status_message;type:text" json:"status_message,omitempty"`
|
|
TrackID *uuid.UUID `gorm:"type:uuid" json:"track_id,omitempty"`
|
|
TrackTitle string `gorm:"type:text" json:"track_title,omitempty"`
|
|
Invisible bool `gorm:"not null;default:false" json:"invisible"`
|
|
UpdatedAt time.Time `gorm:"not null" json:"updated_at"`
|
|
}
|
|
|
|
// TableName overrides the table name
|
|
func (UserPresence) TableName() string {
|
|
return "user_presence"
|
|
}
|