core

package
v0.0.0-...-c2c5a46 Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2021 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CharacterDTO

type CharacterDTO struct {
	dto.EntityMetadata `mapper:"Model" json:"metadata"`
	Race               entity.CharacterRace `mapper:"Race" json:"race,omitempty"`
	Stat               StatDTO              `mapper:"Stat" json:"stat,omitempty"`
	State              StateDTO             `mapper:"State" json:"state,omitempty"`
	Name               string               `mapper:"Name" json:"name,omitempty"`
}

func MakeCharacterDTOFromEntity

func MakeCharacterDTOFromEntity(chara entity.Character) (CharacterDTO, error)

func (CharacterDTO) ApplyToEntity

func (d CharacterDTO) ApplyToEntity(chara *entity.Character) error

type StatDTO

type StatDTO struct {
	dto.EntityMetadata `mapper:"Model" json:"metadata"`
	BaseAttack         int  `mapper:"BaseAttack" json:"baseAttack,omitempty"`
	BaseDefense        int  `mapper:"BaseDefense" json:"baseDefense,omitempty"`
	BaseMP             int  `mapper:"BaseMP" json:"baseMP,omitempty"`
	BaseHP             int  `mapper:"BaseHP" json:"baseHP,omitempty"`
	Strength           int  `mapper:"Strength" json:"strength,omitempty"`
	Speed              int  `mapper:"Speed" json:"speed,omitempty"`
	Intelligence       int  `mapper:"Intelligence" json:"intelligence,omitempty"`
	CharacterID        uint `mapper:"CharacterID" json:"characterID,omitempty"`
}

type StateDTO

type StateDTO struct {
	dto.EntityMetadata `mapper:"Model" json:"metadata"`
	CurrentMP          int  `mapper:"CurrentMP" json:"currentMP,omitempty"`
	CurrentHP          int  `mapper:"CurrentHP" json:"currentHP,omitempty"`
	CharacterID        uint `mapper:"CharacterID" json:"characterID,omitempty"`
}

Jump to

Keyboard shortcuts

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