zo

package module
v0.0.0-...-173852c Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2021 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Create

func Create(zo *Zo) (int, error)

func Delete

func Delete(id int) error

Types

type DeleteResponse

type DeleteResponse struct {
	models.ResponseBase
}

type GetAllResponse

type GetAllResponse struct {
	models.ResponseBase
	Zos []Zo `json:"zos"`
}

type GetResponse

type GetResponse struct {
	models.ResponseBase
	Zo *Zo `json:"zo"`
}

type PostResponse

type PostResponse struct {
	models.ResponseBase
	Zo *Zo `json:"zo"`
}

type PutResponse

type PutResponse struct {
	models.ResponseBase
	Zo *Zo `json:"zo"`
}

type Zo

type Zo struct {
	Id              int          `json:"id"`
	AchievementDate time.Time    `json:"achievementdate"`
	Exp             int          `json:"exp"`
	CategoryId      int          `json:"categoryid"`
	Message         string       `json:"message"`
	CreatedAt       time.Time    `json:"createdat"`
	UpdatedAt       sql.NullTime `json:"updatedat"`
}

func Find

func Find(id int) (*Zo, error)

func FindAll

func FindAll() ([]Zo, error)

func NewZo

func NewZo(
	id int,
	achievementDate time.Time,
	exp int,
	categoryId int,
	message string,
	createdAt time.Time,
	updatedAt sql.NullTime,
) *Zo

func (*Zo) Update

func (zo *Zo) Update() error

Jump to

Keyboard shortcuts

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