A Q&A platform software for teams at any scales. Whether it's a community forum, help center, or knowledge management platform, you can always count on Apache Answer.
style: rename activity entity
LinkinStar7461f601ca48
diff --git a/internal/entity/activity_entity.go b/internal/entity/activity_entity.goindex 644db176..3e7a7c16 100644--- a/internal/entity/activity_entity.go+++ b/internal/entity/activity_entity.go@@ -21,8 +21,8 @@ type Activity struct {HasRank int `xorm:"not null default 0 TINYINT(4) has_rank"`}-type ActivityRunkSum struct {- Rank int `xorm:"not null default 0 comment('rank of current operating user affected') INT(11) rank"`+type ActivityRankSum struct {+ Rank int `xorm:"not null default 0 INT(11) rank"`}// TableName activity table namediff --git a/internal/repo/activity_repo.go b/internal/repo/activity_repo.goindex 5893ad1c..868041df 100644--- a/internal/repo/activity_repo.go+++ b/internal/repo/activity_repo.go@@ -75,7 +75,7 @@ func (ar *ActivityRepo) GetActivity(ctx context.Context, session *xorm.Session,}func (ar *ActivityRepo) GetUserIDObjectIDActivitySum(ctx context.Context, userID, objectID string) (int, error) {- sum := &entity.ActivityRunkSum{}+ sum := &entity.ActivityRankSum{}_, err := ar.data.DB.Table(entity.Activity{}.TableName()).Select("sum(rank) as rank").Where("user_id =?", userID).