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

Major refactorings.

Introduce summaries.
This commit is contained in:
Ferdinand Mütsch
2019-05-19 19:49:27 +02:00
parent 62e94f6635
commit be906805e7
14 changed files with 194 additions and 282 deletions

View File

@ -7,15 +7,13 @@ import (
"strconv"
"strings"
"time"
"github.com/jinzhu/gorm"
)
type HeartbeatReqTime time.Time
type Heartbeat struct {
gorm.Model
User *User `json:"user" gorm:"not null; association_foreignkey:ID"`
ID uint `gorm:"primary_key"`
User *User `json:"-" gorm:"not null; index:idx_time_user"`
UserID string `json:"-" gorm:"not null; index:idx_time_user"`
Entity string `json:"entity" gorm:"not null"`
Type string `json:"type"`