dto

package
v0.0.0-...-a330f29 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BalanceQueries

type BalanceQueries struct {
	HappenedAfter  string `query:"happened_after"`
	HappenedBefore string `query:"happened_before"`
	UserId         string `query:"-"`
}

type BalanceRespBody

type BalanceRespBody struct {
	Income   float64 `json:"income"`
	Expenses float64 `json:"expenses"`
	Balance  float64 `json:"balance"`
}

type ItemInBody

type ItemInBody struct {
	Amount     int       `json:"amount" validate:"required|int" message:"int:{field} 必填且必须是数字类型"`
	Kind       string    `` /* 129-byte string literal not displayed */
	TagId      string    `json:"tag_id" validate:"required" message:"required:{field} 必填"`
	UserId     string    `json:"user_id" validate:"required" message:"required:{field} 必填"`
	HappenedAt time.Time `json:"-" validate:"-"`
}

func (*ItemInBody) ToModel

func (r *ItemInBody) ToModel() *model.Item

type ItemListQueries

type ItemListQueries struct {
	HappenedAfter  string `query:"happened_after"`
	HappenedBefore string `query:"happened_before"`
	Page           int    `query:"page"`
	Limit          int    `query:"limit"`
	UserId         string `query:"-"`
}

type TagInBody

type TagInBody struct {
	Name   string `json:"name" validate:"required" message:"required:{field} 必填"`
	Kind   string `` /* 129-byte string literal not displayed */
	Sign   string `json:"sign" validate:"required" message:"required:{field} 必填"`
	UserId string `json:"userId" validate:"required" message:"required:{field} 必填"`
}

func (*TagInBody) ToModel

func (body *TagInBody) ToModel() *model.Tag

type TagListQueries

type TagListQueries struct {
	Kind   string `query:"kind"`
	Page   int    `query:"page"`
	UserId string `query:"-"`
}

type UserEmailBody

type UserEmailBody struct {
	Email string `json:"email" validate:"required|email" message:"required:{field} 必填|email:{field} 邮箱格式错误"`
}

type UserInBody

type UserInBody struct {
	Email            string `json:"email" validate:"required|email" message:"required:{field} 必填|email:{field} 邮箱格式错误"`
	VerificationCode string `` /* 171-byte string literal not displayed */
}

func (*UserInBody) ToModel

func (r *UserInBody) ToModel() *model.User

type UserOutBody

type UserOutBody struct {
	UserId uint64 `json:"userId"`
	Email  string `json:"email"`
	Token  string `json:"token"`
}

type UserProfileResp

type UserProfileResp struct {
	Email     string `json:"email"`
	UserId    uint64 `json:"user_id"`
	CreatedAt string `json:"created_at"`
}

Jump to

Keyboard shortcuts

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