2024-07-19 08:03:35 +00:00
|
|
|
package models
|
|
|
|
|
2024-08-09 20:45:12 +00:00
|
|
|
type UserFavorite struct {
|
2024-08-09 19:37:54 +00:00
|
|
|
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"`
|
2024-07-19 08:03:35 +00:00
|
|
|
}
|
|
|
|
|
2024-08-09 20:45:12 +00:00
|
|
|
func (UserFavorite) TableName() string {
|
2024-07-19 08:03:35 +00:00
|
|
|
return "UserFavorites"
|
|
|
|
}
|