package models import "time" type UserFavorite struct { UserID string `gorm:"primaryKey"` PostID string `gorm:"primaryKey"` CreatedAt time.Time } func (UserFavorite) TableName() string { return "UserFavorites" } type FavoriteList struct { Posts []Post `json:"posts,omitempty"` }