zdpgo_gin_wallet

package module
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2024 License: Apache-2.0 Imports: 4 Imported by: 2

README

zdpgo_gin_wallet

提供钱包相关的接口,负责处理充值记录,钱包余额等逻辑

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetAccountAddHandler

func GetAccountAddHandler(db *gorm.DB) gin.HandlerFunc

func GetAccountUpdateHandler

func GetAccountUpdateHandler(db *gorm.DB) gin.HandlerFunc

Types

type GinWalletAccount

type GinWalletAccount struct {
	Id       int     `json:"id"`
	Username string  `json:"username" gorm:"column:username;unique;"`
	Money    float64 `json:"money"`
	AddTime  int     `json:"add_time" gorm:"type:int"`
}

GinWalletAccount 钱包账户表

type GinWalletAccountRecord

type GinWalletAccountRecord struct {
	Id          int     `json:"id"`
	Username    string  `json:"username"`
	AddMoney    float64 `json:"add_money" gorm:"type:decimal"`
	OldMoney    float64 `json:"old_money" gorm:"type:decimal"`
	TotalMoney  float64 `json:"total_money" gorm:"type:decimal"`
	AddTime     int     `json:"add_time" gorm:"type:int"`
	Category    string  `json:"category" gorm:"type:varchar(2);default:'支出'"` // 类型:支出/收入
	Description string  `json:"description"`
}

GinWalletAccountRecord 钱包账户变动记录表

type RequestAccount

type RequestAccount struct {
	Username    string  `json:"username" binding:"required,gte=3,lte=36"`
	Money       float64 `json:"money" binding:"gte=0,lte=10000000"`
	Category    string  `json:"category"`
	Description string  `json:"description"`
}

Directories

Path Synopsis
examples

Jump to

Keyboard shortcuts

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