refactor: rename tables to bot_*

This commit is contained in:
Jason Song
2022-11-29 12:34:23 +08:00
parent 3ac6bf3db4
commit 04d72d3500
20 changed files with 173 additions and 201 deletions

View File

@ -15,7 +15,7 @@ import (
"xorm.io/builder"
)
type RunList []*Run
type RunList []*BotRun
// GetUserIDs returns a slice of user's id
func (runs RunList) GetUserIDs() []int64 {
@ -111,5 +111,5 @@ func FindRuns(ctx context.Context, opts FindRunOptions) (RunList, int64, error)
}
func CountRuns(ctx context.Context, opts FindRunOptions) (int64, error) {
return db.GetEngine(ctx).Where(opts.toConds()).Count(new(Run))
return db.GetEngine(ctx).Where(opts.toConds()).Count(new(BotRun))
}