v1

package
v0.0.0-...-894796f Latest Latest
Warning

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

Go to latest
Published: Dec 22, 2020 License: MIT Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddBill

func AddBill(c *gin.Context)

func AddBillType

func AddBillType(c *gin.Context)

func DeleteBill

func DeleteBill(c *gin.Context)

func DeleteBillType

func DeleteBillType(c *gin.Context)

func GetBill

func GetBill(c *gin.Context)

func GetBillList

func GetBillList(c *gin.Context)

func GetBillOverview

func GetBillOverview(c *gin.Context)

func GetBillType

func GetBillType(c *gin.Context)

func GetBillTypeList

func GetBillTypeList(c *gin.Context)

func GetProfile

func GetProfile(c *gin.Context)

GetProfile 获取用户信息

func GetRecentBill

func GetRecentBill(c *gin.Context)

func Login

func Login(c *gin.Context)

Login 用户登录

func Register

func Register(c *gin.Context)

Register 注册

func UpdateBill

func UpdateBill(c *gin.Context)

func UpdateBillType

func UpdateBillType(c *gin.Context)

Types

type BillBody

type BillBody struct {
	Name   string          `json:"name" binding:"required"`
	Amount decimal.Decimal `json:"amount" binding:"required,gt>0"`
	Remark string          `json:"remark" binding:"omitempty,max=100"`
	Date   string          `json:"date" binding:"required,datetime"`
	TypeID uint            `json:"type_id" binding:"required"`
	Income bool            `json:"income" binding:"required"`
}

type DeleteBillBody

type DeleteBillBody struct {
	BillID uint `json:"bill_id" binding:"required"`
}

type DeleteBillTypeForm

type DeleteBillTypeForm struct {
	BillTypeID uint `json:"bill_type_id" binding:"required"`
}

type LoginBody

type LoginBody struct {
	Username string `json:"username" binding:"required,min=6,max=16"`
	Password string `json:"password" binding:"required,min=6,max=16"`
}

LoginBody 登录实体

type RegisterBody

type RegisterBody struct {
	Username  string `json:"username" binding:"required,min=6,max=16"`
	Password  string `json:"password" binding:"required,min=6,max=16"`
	Telephone string `json:"telephone" binding:"required,telephone"`
	Nickname  string `json:"nickname" binding:"omitempty,min=2,max=10"`
}

RegisterBody 注册实体

type UpdateBillBody

type UpdateBillBody struct {
	BillID uint            `json:"bill_id" binding:"required"`
	Name   string          `json:"name"`
	Amount decimal.Decimal `json:"amount" binding:"omitempty,gt>0"`
	Remark string          `json:"remark" binding:"omitempty,max=100"`
	Date   string          `json:"date" binding:"omitempty,datetime"`
	TypeID uint            `json:"type_id"`
	Income string          `json:"income"`
}

Jump to

Keyboard shortcuts

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