model

package
v0.0.0-...-c9664ae Latest Latest
Warning

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

Go to latest
Published: Jul 23, 2022 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BannerResponse

type BannerResponse struct {
	Name        string  `json:"name"`
	Description *string `json:"description"`
	ImageUrl    string  `json:"image_url"`
	Seq         int32   `json:"seq"`
	IsShow      bool    `json:"is_show"`
}

type Empty

type Empty struct{}

type LoginRequest

type LoginRequest struct {
	Email    string `json:"email" example:"test@test.com" binding:"required,email,max=30"`
	Password string `json:"password" example:"asdf" binding:"required,max=20"`
}

type LoginResponse

type LoginResponse struct {
	Token   string `json:"token" example:"asdf123"`
	Message string `json:"message" example:"Success"`
}
type MenuRequest struct {
	ID          string  `form:"id"`
	Name        string  `form:"name"`
	Description string  `form:"description"`
	Price       float64 `form:"price" binding:"numeric"`
	Limit       int32   `form:"limit" binding:"numeric"`
	Offset      int32   `form:"offset" binding:"numeric"`
}
func (r *MenuRequest) ToEntity() *entity.Menu
type MenuResponse struct {
	ID          string  `json:"id"`
	Name        string  `json:"name"`
	Stock       int32   `json:"stock"`
	Description string  `json:"description"`
	Price       float64 `json:"price"`
	ImageUrl    string  `json:"image_url"`
}

type RegisterRequest

type RegisterRequest struct {
	Name        string `json:"name" example:"test" binding:"required,max=50"`
	Email       string `json:"email" example:"test@test.com" binding:"required,email,max=30"`
	Password    string `json:"password" example:"asdf" binding:"required,max=20"`
	PhoneNumber string `json:"phone_number" example:"08123456789" binding:"required,numeric,max=13"`
	IsBlocked   bool   `json:"is_blocked" example:"false"`
	FcmToken    string `json:"fcm_token" example:"asdf123" binding:"required"`
}

func (*RegisterRequest) ToEntity

func (r *RegisterRequest) ToEntity() *entity.User

type Response

type Response struct {
	Message   string      `json:"message"`
	Status    string      `json:"status"`
	Timestamp string      `json:"timestamp"`
	Data      interface{} `json:"data,omitempty"`
}

Jump to

Keyboard shortcuts

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