31 lines
858 B
Go
31 lines
858 B
Go
package models
|
|
|
|
import "time"
|
|
|
|
// TODO: Struct for mapping a note to a user for their personal feed
|
|
// Storing timeline info in redis could also be an idea, but I kinda like
|
|
// everything being in one place
|
|
// Data needed:
|
|
// - Which note
|
|
// - Who's feed
|
|
// - Which feed (once separate feeds are implemented)
|
|
// - Reason:
|
|
// - Boost
|
|
// - Follow person
|
|
// - Follow tag
|
|
//
|
|
// Also need to store the boosts a user has performed somewhere
|
|
// Maybe adjust Reaction? Though a separate table might be a better option
|
|
|
|
// Assigns a note to a feed.
|
|
// Multiple notes may be assigned to multiple feeds, but each feed may contain
|
|
// one note at most once.
|
|
type NoteToFeed struct {
|
|
ID uint64 `gorm:"primarykey"`
|
|
CreatedAt time.Time
|
|
Note Note // The note being assigned
|
|
NoteId string
|
|
// Feed Feed
|
|
// FeedId uint64
|
|
// Reason AppearanceReason
|
|
}
|