Deretardify the caching
This commit is contained in:
21
types/types.go
Normal file
21
types/types.go
Normal file
@@ -0,0 +1,21 @@
|
||||
package types
|
||||
|
||||
import "time"
|
||||
|
||||
// Character represents a character with authentication info
|
||||
type Character struct {
|
||||
ID int64 `gorm:"primaryKey"` // EVE character ID from JWT token
|
||||
CharacterName string `gorm:"uniqueIndex"`
|
||||
AccessToken string
|
||||
RefreshToken string
|
||||
ExpiresAt time.Time
|
||||
UpdatedAt time.Time
|
||||
CreatedAt time.Time
|
||||
}
|
||||
|
||||
type CacheEntry struct {
|
||||
ID uint `gorm:"primaryKey"`
|
||||
Hash string `gorm:"uniqueIndex"`
|
||||
Data string `gorm:"type:text"`
|
||||
CachedAt time.Time `gorm:"index"`
|
||||
}
|
||||
Reference in New Issue
Block a user