package entity import "leafdev.top/Ecosystem/recommender/internal/schema" type User struct { Id schema.EntityId `gorm:"primarykey" json:"id"` Title string `json:"name"` } func (u *User) TableName() string { return "users" } type ExternalUser struct { Model Id schema.EntityId `gorm:"primarykey" json:"id"` Name string `json:"name"` Email string `json:"email"` ExternalId string `json:"external_id"` Summary string `json:"summary"` ApplicationId schema.EntityId `json:"application_id"` Application *Application } func (u *ExternalUser) TableName() string { return "external_users" } type UserLike struct { ExternalUserId schema.EntityId `gorm:"primarykey" json:"external_user_id"` PostId schema.EntityId `gorm:"primarykey" json:"post_id"` Type schema.UserLikeType `json:"type"` Application *Application ApplicationId schema.EntityId `json:"application_id"` } func (u *UserLike) TableName() string { return "user_likes" } type UserTagScore struct { ExternalUserId schema.EntityId `gorm:"primarykey" json:"external_user_id"` TagId schema.EntityId `gorm:"primarykey" json:"tag_id"` Tag *Tag Score int `json:"score"` Application *Application ApplicationId schema.EntityId `json:"application_id"` } func (u *UserTagScore) TableName() string { return "user_tag_scores" }