1
0
mirror of https://github.com/muety/wakapi.git synced 2023-08-10 21:12:56 +03:00

chore: add caching to badge endpoint

chore: add type index for summary items
This commit is contained in:
Ferdinand Mütsch
2021-03-24 21:49:42 +01:00
parent 5ca9a6a8be
commit 2d1010e9d9
2 changed files with 12 additions and 1 deletions

View File

@ -35,7 +35,7 @@ type SummaryItem struct {
ID uint `json:"-" gorm:"primary_key"`
Summary *Summary `json:"-" gorm:"not null; constraint:OnUpdate:CASCADE,OnDelete:CASCADE"`
SummaryID uint `json:"-"`
Type uint8 `json:"-"`
Type uint8 `json:"-" gorm:"index:idx_type"`
Key string `json:"key"`
Total time.Duration `json:"total" swaggertype:"primitive,integer"`
}