otter-space-sdk/pkg/models/userFavorite.go

14 lines
362 B
Go
Raw Normal View History

package models
type UserFavorite struct {
BaseModel[UserFavoriteID]
UserID string `json:"user_id"`
PostID string `json:"post_id"`
UserSourceID UserSourceID `json:"user_source_id"`
UserSource UserSource `json:"-" gorm:"foreignKey:ID;references:UserSourceID"`
}
func (UserFavorite) TableName() string {
return "UserFavorites"
}