mirror of https://gitee.com/answerdev/answer.git
style: rename activity entity
This commit is contained in:
parent
c8463505bb
commit
7461f601ca
|
@ -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 name
|
||||
|
|
|
@ -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).
|
||||
|
|
Loading…
Reference in New Issue