Documentation
¶
Index ¶
- func AddBill(c *gin.Context)
- func AddBillType(c *gin.Context)
- func DeleteBill(c *gin.Context)
- func DeleteBillType(c *gin.Context)
- func GetBill(c *gin.Context)
- func GetBillList(c *gin.Context)
- func GetBillOverview(c *gin.Context)
- func GetBillType(c *gin.Context)
- func GetBillTypeList(c *gin.Context)
- func GetProfile(c *gin.Context)
- func GetRecentBill(c *gin.Context)
- func Login(c *gin.Context)
- func Register(c *gin.Context)
- func UpdateBill(c *gin.Context)
- func UpdateBillType(c *gin.Context)
- type BillBody
- type DeleteBillBody
- type DeleteBillTypeForm
- type LoginBody
- type RegisterBody
- type UpdateBillBody
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddBillType ¶
func DeleteBill ¶
func DeleteBillType ¶
func GetBillList ¶
func GetBillOverview ¶
func GetBillType ¶
func GetBillTypeList ¶
func GetRecentBill ¶
func UpdateBill ¶
func UpdateBillType ¶
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"`
}
Click to show internal directories.
Click to hide internal directories.