models

package
v1.4.8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 11, 2021 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BotCache added in v1.4.5

type BotCache struct {
	General
	Key   string `gorm:"index:idx_cache_key"`
	Value string `gorm:"size:8196"`
}

type General

type General struct {
	ID        uint           `gorm:"primaryKey"`
	CreatedAt int64          `gorm:"autoCreateTime"`
	UpdatedAt int64          `gorm:"autoUpdateTime"`
	DeletedAt gorm.DeletedAt `gorm:"index"`
}

type RegisteredUser

type RegisteredUser struct {
	General
	UserId string `gorm:"unique"`
}

type SotBalance

type SotBalance struct {
	General
	UserID       uint           `gorm:"unique"`
	User         RegisteredUser `gorm:"constraint:OnUpdate:CASCADE,OnDelete:CASCADE"`
	Gold         int
	Doubloons    int
	AncientCoins int
	LastUpdated  int64
}

type SotBalanceHistory

type SotBalanceHistory struct {
	General
	UserID       uint
	User         RegisteredUser `gorm:"constraint:OnUpdate:CASCADE,OnDelete:CASCADE"`
	Gold         int
	Doubloons    int
	AncientCoins int
	LastUpdated  int64
}

type UserPref

type UserPref struct {
	General
	UserID uint           `gorm:"index:idx_user_key"`
	User   RegisteredUser `gorm:"constraint:OnUpdate:CASCADE,OnDelete:CASCADE"`
	Key    string         `gorm:"index:idx_user_key"`
	Value  string         `gorm:"size:1024"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL