SoXX
b6c037cb22
- Rename `UserFavorites` struct to `UserFavorite` - Update the `TableName` method to reflect the new struct name
14 lines
362 B
Go
14 lines
362 B
Go
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"
|
|
}
|