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]
|
2024-08-14 11:43:11 +00:00
|
|
|
UserID UserID `json:"user_id"`
|
|
|
|
PostID PostID `json:"post_id"`
|
2024-08-09 19:37:54 +00:00
|
|
|
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"
|
|
|
|
}
|