summaryrefslogtreecommitdiffstats
path: root/models/models.go
diff options
context:
space:
mode:
Diffstat (limited to 'models/models.go')
-rw-r--r--models/models.go10
1 files changed, 9 insertions, 1 deletions
diff --git a/models/models.go b/models/models.go
index 0e20a1ab2f..d485489586 100644
--- a/models/models.go
+++ b/models/models.go
@@ -120,7 +120,10 @@ func NewEngine() (err error) {
type Statistic struct {
Counter struct {
- User, PublicKey, Repo, Watch, Action, Access int64
+ User, PublicKey, Repo,
+ Watch, Action, Access,
+ Issue, Comment,
+ Mirror, Oauth, Release int64
}
}
@@ -131,5 +134,10 @@ func GetStatistic() (stats Statistic) {
stats.Counter.Watch, _ = orm.Count(new(Watch))
stats.Counter.Action, _ = orm.Count(new(Action))
stats.Counter.Access, _ = orm.Count(new(Access))
+ stats.Counter.Issue, _ = orm.Count(new(Issue))
+ stats.Counter.Comment, _ = orm.Count(new(Comment))
+ stats.Counter.Mirror, _ = orm.Count(new(Mirror))
+ stats.Counter.Oauth, _ = orm.Count(new(Oauth2))
+ stats.Counter.Release, _ = orm.Count(new(Release))
return
}