Documentation ¶
Index ¶
- Variables
- type FloorModel
- func (m *FloorModel) CreateFloor(floor *TFloor) (result *TFloor, err error)
- func (m *FloorModel) FindActiveFloor(discordId string) (result *TFloor, err error)
- func (m *FloorModel) FindAllFloors() (result *TFloors, err error)
- func (m *FloorModel) FindFloor(discordId string, floorNumber int) (result *TFloor, err error)
- func (m *FloorModel) SaveFloor(floor *TFloor) (result *TFloor, err error)
- type InventoryModel
- func (m *InventoryModel) CreateInventory(inv *TInventory) (result *TInventory, err error)
- func (m *InventoryModel) FindAllInventories() (result *TInventories, err error)
- func (m *InventoryModel) FindInventory(discordId string) (result *TInventory, err error)
- func (m *InventoryModel) SaveInventory(inv *TInventory) (result *TInventory, err error)
- type TFloor
- type TFloors
- type TInventories
- type TInventory
- type TUser
- type TUsers
- type UserModel
Constants ¶
This section is empty.
Variables ¶
View Source
var Floor = &FloorModel{}
View Source
var Inventory = &InventoryModel{}
View Source
var User = &UserModel{}
Functions ¶
This section is empty.
Types ¶
type FloorModel ¶
type FloorModel struct {
// contains filtered or unexported fields
}
func NewFloorModel ¶
func NewFloorModel(db *gorm.DB) *FloorModel
func (*FloorModel) CreateFloor ¶
func (m *FloorModel) CreateFloor(floor *TFloor) (result *TFloor, err error)
func (*FloorModel) FindActiveFloor ¶
func (m *FloorModel) FindActiveFloor(discordId string) (result *TFloor, err error)
func (*FloorModel) FindAllFloors ¶
func (m *FloorModel) FindAllFloors() (result *TFloors, err error)
type InventoryModel ¶
type InventoryModel struct {
// contains filtered or unexported fields
}
func NewInventoryModel ¶
func NewInventoryModel(db *gorm.DB) *InventoryModel
func (*InventoryModel) CreateInventory ¶
func (m *InventoryModel) CreateInventory(inv *TInventory) (result *TInventory, err error)
func (*InventoryModel) FindAllInventories ¶
func (m *InventoryModel) FindAllInventories() (result *TInventories, err error)
func (*InventoryModel) FindInventory ¶
func (m *InventoryModel) FindInventory(discordId string) (result *TInventory, err error)
func (*InventoryModel) SaveInventory ¶
func (m *InventoryModel) SaveInventory(inv *TInventory) (result *TInventory, err error)
type TFloor ¶
type TFloor struct { ID uint `gorm:"type:bigserial;primaryKey"` DiscordId string `gorm:"type:varchar;not null;uniqueIndex:idx_floors_number"` Floor int `gorm:"type:integer;default:1;not null;uniqueIndex:idx_floors_number"` Exploration float32 `gorm:"type:real;default:0;not null"` Active bool `gorm:"type:boolean;default:false;not null"` CreatedAt time.Time UpdatedAt time.Time }
type TInventories ¶
type TInventories []TInventory
type TInventory ¶
type TInventory struct { ID uint `gorm:"type:bigserial;primaryKey"` DiscordId string `gorm:"type:varchar;not null"` ItemName string `gorm:"type:varchar;not null"` ItemType string `gorm:"type:varchar;not null"` Durability int `gorm:"type:integer;not null"` Active bool `gorm:"type:boolean;default:false;not null"` CreatedAt time.Time UpdatedAt time.Time }
type TUser ¶
type TUser struct { ID uint `gorm:"type:bigserial;primaryKey"` DiscordId string `gorm:"type:varchar;not null;unique;uniqueIndex"` Coins int `gorm:"type:integer;default:0;not null"` Level int `gorm:"type:integer;default:1;not null"` Xp int `gorm:"type:integer;default:0;not null"` Kills int `gorm:"type:integer;default:0;not null"` Class string `gorm:"type:varchar;not null"` Subclass string `gorm:"type:varchar;not null"` ClassAscension string `gorm:"type:varchar;default:'1';not null"` Strength int `gorm:"type:integer;default:1;not null"` Agility int `gorm:"type:integer;default:1;not null"` Mana int `gorm:"type:integer;default:1;not null"` Health int `gorm:"type:integer;default:1;not null"` Defence int `gorm:"type:integer;default:1;not null"` Luck int `gorm:"type:integer;default:1;not null"` CreatedAt time.Time UpdatedAt time.Time }
type UserModel ¶
type UserModel struct {
// contains filtered or unexported fields
}
func NewUserModel ¶
func (*UserModel) CreateUser ¶
func (*UserModel) FindAllUsers ¶
Click to show internal directories.
Click to hide internal directories.