request

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2024 License: AGPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetFlagByFlagName

func GetFlagByFlagName(name TransactionShareConfigName) (userModel.Flag, error)

Types

type AccountCreateOne

type AccountCreateOne struct {
	Name     string            `binding:"required"`
	Icon     string            `binding:"required"`
	Location string            `binding:"required"`
	Type     accountModel.Type `binding:"required"`
}

AccountCreateOne 账本新建

type AccountCreateOneUserInvitation

type AccountCreateOneUserInvitation struct {
	Invitee uint                   `binding:"required"`
	Role    *accountModel.UserRole `binding:"omitempty"`
}

AccountCreateOneUserInvitation 账本邀请建立

type AccountGetUserInfo

type AccountGetUserInfo struct {
	Types []InfoType
}

AccountGetUserInfo 账本用户信息获取

type AccountGetUserInvitationList

type AccountGetUserInvitationList struct {
	AccountId uint                   `binding:"required"`
	Invitee   *uint                  `binding:"omitempty"`
	Role      *accountModel.UserRole `binding:"omitempty"`
	PageData
}

AccountGetUserInvitationList 账本邀请列表

type AccountId

type AccountId struct {
	AccountId uint
}

type AccountInfo

type AccountInfo struct {
	Types *[]InfoType `binding:"omitempty"`
}

type AccountMapping

type AccountMapping struct {
	AccountId uint
}

AccountMapping 账本关联

type AccountTransCategoryInit

type AccountTransCategoryInit struct {
	TemplateId uint
}

AccountTransCategoryInit 账本交易类型初始话化

type AccountUpdateOne

type AccountUpdateOne struct {
	Name *string
	Icon *string
	Type accountModel.Type `binding:"required"`
}

AccountUpdateOne 账本修改

type AccountUpdateUser

type AccountUpdateUser struct {
	Role accountModel.UserRole `binding:"required"`
}

func (*AccountUpdateUser) GetUpdateData

func (a *AccountUpdateUser) GetUpdateData() accountModel.UserUpdateData

type AccountUserConfigFlagUpdate

type AccountUserConfigFlagUpdate struct {
	Status bool
}

type CategoryCreateOne

type CategoryCreateOne struct {
	Name     string `binding:"required"`
	Icon     string `binding:"required"`
	FatherId uint   `binding:"required"`
}

type CategoryCreateOneFather

type CategoryCreateOneFather struct {
	Name          string
	IncomeExpense constant.IncomeExpense
}

type CategoryGetList

type CategoryGetList struct {
	IncomeExpense *constant.IncomeExpense `binding:"omitempty"`
}

type CategoryGetMappingTree

type CategoryGetMappingTree struct {
	MappingAccountId uint `binding:"required"`
}

type CategoryGetTree

type CategoryGetTree struct {
	IncomeExpense *constant.IncomeExpense
}

type CategoryMapping

type CategoryMapping struct {
	ChildCategoryId uint
}

type CategoryMove

type CategoryMove struct {
	Previous *uint
	FatherId *uint
}

type CategoryMoveFather

type CategoryMoveFather struct {
	Previous *uint
}

type CategoryOne

type CategoryOne struct {
	Id            uint
	Name          string
	Icon          string
	FatherId      uint
	IncomeExpense IncomeExpense
}

type CategoryUpdateOne

type CategoryUpdateOne struct {
	Name *string
	Icon *string
}

type CommonSendEmailCaptcha

type CommonSendEmailCaptcha struct {
	Email string              `binding:"required,email"`
	Type  constant.UserAction `binding:"required,oneof=register forgetPassword"`
	PicCaptcha
}

type GetOne

type GetOne struct {
	Id int `json:"id" binding:"required"`
}

type Id

type Id struct {
	Id uint
}

type IncomeExpense

type IncomeExpense struct {
	IncomeExpense constant.IncomeExpense `json:"Income_expense"`
}

type InfoType

type InfoType string

信息类型

var CurrentMonthTransTotal InfoType = "currentMonthTransTotal"

本月交易统计

var RecentTrans InfoType = "recentTrans"

最近交易数据

var TodayTransTotal InfoType = "todayTransTotal"

今日交易统计

type Name

type Name struct {
	Name string
}

type PageData

type PageData struct {
	Offset int `binding:"gte=0"`
	Limit  int `binding:"gt=0"`
}

type PicCaptcha

type PicCaptcha struct {
	Captcha   string `binding:"required"`
	CaptchaId string `binding:"required"`
}

type ProductMappingTransactionCategory

type ProductMappingTransactionCategory struct {
	CategoryId uint
}

type TimeFrame

type TimeFrame struct {
	StartTime time.Time
	EndTime   time.Time
}

func (*TimeFrame) CheckTimeFrame

func (t *TimeFrame) CheckTimeFrame() error

func (*TimeFrame) FormatDayTime

func (t *TimeFrame) FormatDayTime() (startTime time.Time, endTime time.Time)

格式化日时间 将StartTime置为当日第一秒 endTime置为当日最后一秒

func (*TimeFrame) SetLocal

func (t *TimeFrame) SetLocal(l *time.Location)

func (*TimeFrame) ToUTC

func (t *TimeFrame) ToUTC()

type TourApply

type TourApply struct {
	DeviceNumber string
	Key          string
	Sign         string
}

func (*TourApply) CheckSign

func (t *TourApply) CheckSign() bool

type TransactionAmountRank

type TransactionAmountRank struct {
	AccountId     uint                   `binding:"required"`
	IncomeExpense constant.IncomeExpense `binding:"required,oneof=income expense"`
	TimeFrame
}

type TransactionCategoryAmountRank

type TransactionCategoryAmountRank struct {
	AccountId     uint                   `binding:"required"`
	IncomeExpense constant.IncomeExpense `binding:"required,oneof=income expense"`
	Limit         *int                   `binding:"omitempty"`
	TimeFrame
}

type TransactionCreateOne

type TransactionCreateOne struct {
	Amount        int
	CategoryId    uint
	IncomeExpense constant.IncomeExpense
	Remark        string
	TradeTime     time.Time
}

type TransactionDayStatistic

type TransactionDayStatistic struct {
	AccountId     uint `binding:"required"`
	CategoryIds   *[]uint
	IncomeExpense *constant.IncomeExpense `binding:"omitempty,oneof=income expense"`
	TimeFrame
}

type TransactionGetList

type TransactionGetList struct {
	TransactionQueryCondition
	PageData
}

type TransactionMonthStatistic

type TransactionMonthStatistic struct {
	TransactionQueryCondition
}

type TransactionQueryCondition

type TransactionQueryCondition struct {
	AccountId     uint `binding:"required"`
	UserIds       *[]uint
	CategoryIds   *[]uint
	IncomeExpense *constant.IncomeExpense `binding:"omitempty,oneof=income expense"`
	MinimumAmount *int                    `binding:"omitempty,min=0"`
	MaximumAmount *int                    `binding:"omitempty,min=0"`
	TimeFrame
}

func (*TransactionQueryCondition) GetCondition

func (*TransactionQueryCondition) GetExtensionCondition

func (*TransactionQueryCondition) GetForeignKeyCondition

func (*TransactionQueryCondition) GetStatisticCondition

type TransactionShareConfigName

type TransactionShareConfigName string
const (
	FLAG_ACCOUNT     TransactionShareConfigName = "account"
	FLAG_CREATE_TIME TransactionShareConfigName = "createTime"
	FLAG_UPDATE_TIME TransactionShareConfigName = "updateTime"
	FLAG_REMARK      TransactionShareConfigName = "remark"
)

type TransactionTiming

type TransactionTiming struct {
	Trans  transactionModel.Info
	Config TransactionTimingConfig
}

func (TransactionTiming) GetTimingModel

func (tt TransactionTiming) GetTimingModel() transactionModel.Timing

type TransactionTimingConfig

type TransactionTimingConfig struct {
	UserId     uint
	Type       transactionModel.TimingType
	OffsetDays int
	NextTime   time.Time
}

type TransactionTotal

type TransactionTotal struct {
	TransactionQueryCondition
}

type TransactionUpdateOne

type TransactionUpdateOne struct {
	UserId        uint
	AccountId     uint
	Amount        int
	CategoryId    uint
	IncomeExpense constant.IncomeExpense
	Remark        string
	TradeTime     time.Time
}

type UpdateAccountMapping

type UpdateAccountMapping struct {
	RelatedAccountId uint
}

UpdateAccountMapping 账本关联

type UserCreateFriendInvitation

type UserCreateFriendInvitation struct {
	Invitee uint
}

type UserForgetPassword

type UserForgetPassword struct {
	Email    string `binding:"required,email"`
	Password string `binding:"required"`
	Captcha  string `binding:"required"`
}

type UserGetAccountInvitationList

type UserGetAccountInvitationList struct {
	PageData
}

type UserGetFriendInvitation

type UserGetFriendInvitation struct {
	IsInvite bool
}

type UserHome

type UserHome struct {
	AccountId uint
}

type UserLogin

type UserLogin struct {
	Email    string `binding:"required"`
	Password string `binding:"required"`
	PicCaptcha
}

type UserRegister

type UserRegister struct {
	Username string `binding:"required"`
	Password string `binding:"required"`
	Email    string `binding:"required,email"`
	Captcha  string `binding:"required"`
}

type UserSearch

type UserSearch struct {
	Id       *uint  `binding:"omitempty"`
	Username string `binding:"required"`
	PageData
}

type UserSendEmail

type UserSendEmail struct {
	PicCaptcha
	Type constant.UserAction `binding:"required,oneof=updatePassword"`
}

type UserTransactionShareConfigUpdate

type UserTransactionShareConfigUpdate struct {
	Flag   TransactionShareConfigName
	Status bool
}

type UserUpdateInfo

type UserUpdateInfo struct {
	Username string `binding:"required"`
}

type UserUpdatePassword

type UserUpdatePassword struct {
	Password string `binding:"required"`
	Captcha  string `binding:"required"`
}

Jump to

Keyboard shortcuts

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