chore: 并入 iotlcm-openapi 历史到 openapi/(原提交 3b05d5a)
This commit is contained in:
@@ -0,0 +1,211 @@
|
||||
// Package genin
|
||||
// @Link https://github.com/xiujiecn/xiu-admin
|
||||
// @Copyright Copyright (c) 2026 LiXiujie
|
||||
// @Author Lxj <xxx@example.com>
|
||||
// @License https://github.com/xiujiecn/xiu-admin/blob/master/LICENSE
|
||||
// @AutoGenerate Version
|
||||
package model
|
||||
|
||||
import (
|
||||
"context"
|
||||
"git.5iot.com/iotlcm-public/iotlcm-openapi/internal/consts"
|
||||
"git.5iot.com/iotlcm-public/iotlcm-openapi/internal/library/xgorm/hook"
|
||||
"git.5iot.com/iotlcm-public/iotlcm-openapi/internal/model/entity"
|
||||
"git.5iot.com/iotlcm-public/iotlcm-openapi/internal/model/request"
|
||||
"slices"
|
||||
|
||||
"github.com/gogf/gf/v2/errors/gerror"
|
||||
"github.com/gogf/gf/v2/os/gtime"
|
||||
)
|
||||
|
||||
// TAgentBalanceUpdateFields 修改企业客户财务信息字段过滤
|
||||
type TAgentBalanceUpdateFields struct {
|
||||
DeptId int64 `json:"deptId" dc:"机构ID"`
|
||||
Balance float64 `json:"balance" dc:"账户余额"`
|
||||
WithdrawAmount float64 `json:"withdrawAmount" dc:"可提现金额"`
|
||||
WithdrawAmountStatus int `json:"withdrawAmountStatus" dc:"可提现金额状态: 1-正常, 0-冻结"`
|
||||
InvoiceAmount float64 `json:"invoiceAmount" dc:"已开票金额"`
|
||||
CanInvoiceAmount float64 `json:"canInvoiceAmount" dc:"可开票金额"`
|
||||
CreditLimit float64 `json:"creditLimit" dc:"信用额度"`
|
||||
UsedCredit float64 `json:"usedCredit" dc:"已使用信用额度"`
|
||||
PendingRepayment float64 `json:"pendingRepayment" dc:"待还款金额"`
|
||||
Status int `json:"status" dc:"状态: 0-正常, 1-禁用"`
|
||||
TenantId string `json:"tenantId" dc:"租户ID"`
|
||||
UpdatedBy int64 `json:"updatedBy" dc:"更新者"`
|
||||
UpdatedAt *gtime.Time `json:"updatedAt" dc:"更新时间"`
|
||||
}
|
||||
|
||||
// TAgentBalanceInsertFields 新增企业客户财务信息字段过滤
|
||||
type TAgentBalanceInsertFields struct {
|
||||
DeptId int64 `json:"deptId" dc:"机构ID"`
|
||||
Balance float64 `json:"balance" dc:"账户余额"`
|
||||
WithdrawAmount float64 `json:"withdrawAmount" dc:"可提现金额"`
|
||||
WithdrawAmountStatus int `json:"withdrawAmountStatus" dc:"可提现金额状态: 1-正常, 0-冻结"`
|
||||
InvoiceAmount float64 `json:"invoiceAmount" dc:"已开票金额"`
|
||||
CanInvoiceAmount float64 `json:"canInvoiceAmount" dc:"可开票金额"`
|
||||
CreditLimit float64 `json:"creditLimit" dc:"信用额度"`
|
||||
UsedCredit float64 `json:"usedCredit" dc:"已使用信用额度"`
|
||||
PendingRepayment float64 `json:"pendingRepayment" dc:"待还款金额"`
|
||||
Status int `json:"status" dc:"状态: 0-正常, 1-禁用"`
|
||||
TenantId string `json:"tenantId" dc:"租户ID"`
|
||||
CreatedDept int64 `json:"createdDept" dc:"创建部门"`
|
||||
CreatedBy int64 `json:"createdBy" dc:"创建者"`
|
||||
CreatedAt *gtime.Time `json:"createdAt" dc:"创建时间"`
|
||||
}
|
||||
|
||||
// TAgentBalanceEditParam 修改/新增企业客户财务信息
|
||||
type TAgentBalanceEditParam struct {
|
||||
//entity.TAgentBalance
|
||||
Id int64 `json:"id" dc:"账户ID"`
|
||||
DeptId *int64 `json:"deptId" dc:"机构ID"`
|
||||
Balance *float64 `json:"balance" dc:"账户余额"`
|
||||
WithdrawAmount *float64 `json:"withdrawAmount" dc:"可提现金额"`
|
||||
WithdrawAmountStatus *int `json:"withdrawAmountStatus" dc:"可提现金额状态: 1-正常, 0-冻结"`
|
||||
InvoiceAmount *float64 `json:"invoiceAmount" dc:"已开票金额"`
|
||||
CanInvoiceAmount *float64 `json:"canInvoiceAmount" dc:"可开票金额"`
|
||||
CreditLimit *float64 `json:"creditLimit" dc:"信用额度"`
|
||||
UsedCredit *float64 `json:"usedCredit" dc:"已使用信用额度"`
|
||||
PendingRepayment *float64 `json:"pendingRepayment" dc:"待还款金额"`
|
||||
Status *int `json:"status" dc:"状态: 0-正常, 1-禁用"`
|
||||
TenantId *string `json:"tenantId" dc:"租户ID"`
|
||||
CreatedDept *int64 `json:"createdDept" dc:"创建部门"`
|
||||
CreatedBy *int64 `json:"createdBy" dc:"创建者"`
|
||||
CreatedAt *gtime.Time `json:"createdAt" dc:"创建时间"`
|
||||
UpdatedBy *int64 `json:"updatedBy" dc:"更新者"`
|
||||
UpdatedAt *gtime.Time `json:"updatedAt" dc:"更新时间"`
|
||||
}
|
||||
|
||||
func (in *TAgentBalanceEditParam) Filter(ctx context.Context) (err error) {
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
type TAgentBalanceEditModel struct{}
|
||||
|
||||
// TAgentBalanceDeleteParam 删除企业客户财务信息
|
||||
type TAgentBalanceDeleteParam struct {
|
||||
Id interface{} `json:"id" v:"required#账户ID不能为空" dc:"账户ID"`
|
||||
}
|
||||
|
||||
func (in *TAgentBalanceDeleteParam) Filter(ctx context.Context) (err error) {
|
||||
return
|
||||
}
|
||||
|
||||
type TAgentBalanceDeleteModel struct{}
|
||||
|
||||
// TAgentBalanceViewParam 获取指定企业客户财务信息信息
|
||||
type TAgentBalanceViewParam struct {
|
||||
Id int64 `json:"id" v:"required#账户ID不能为空" dc:"账户ID"`
|
||||
}
|
||||
|
||||
func (in *TAgentBalanceViewParam) Filter(ctx context.Context) (err error) {
|
||||
return
|
||||
}
|
||||
|
||||
type TAgentBalanceViewModel struct {
|
||||
entity.TAgentBalance
|
||||
CreatedBySumma *hook.MemberSumma `json:"createdBySumma" dc:"创建者摘要信息"`
|
||||
UpdatedBySumma *hook.MemberSumma `json:"updatedBySumma" dc:"更新者摘要信息"`
|
||||
}
|
||||
|
||||
// TAgentBalanceListParam 获取企业客户财务信息列表
|
||||
type TAgentBalanceListParam struct {
|
||||
request.PageInfo
|
||||
Id int64 `json:"id" dc:"账户ID"`
|
||||
WithdrawAmountStatus int `json:"withdrawAmountStatus" dc:"可提现金额状态: 1-正常, 0-冻结"`
|
||||
Status int `json:"status" dc:"状态: 0-正常, 1-禁用"`
|
||||
CreatedAt []*gtime.Time `json:"createdAt" dc:"创建时间"`
|
||||
}
|
||||
|
||||
func (in *TAgentBalanceListParam) Filter(ctx context.Context) (err error) {
|
||||
return
|
||||
}
|
||||
|
||||
type TAgentBalanceListModel struct {
|
||||
Id int64 `json:"id" dc:"账户ID"`
|
||||
DeptId int64 `json:"deptId" dc:"机构ID"`
|
||||
Balance float64 `json:"balance" dc:"账户余额"`
|
||||
WithdrawAmount float64 `json:"withdrawAmount" dc:"可提现金额"`
|
||||
WithdrawAmountStatus int `json:"withdrawAmountStatus" dc:"可提现金额状态: 1-正常, 0-冻结"`
|
||||
InvoiceAmount float64 `json:"invoiceAmount" dc:"已开票金额"`
|
||||
CanInvoiceAmount float64 `json:"canInvoiceAmount" dc:"可开票金额"`
|
||||
CreditLimit float64 `json:"creditLimit" dc:"信用额度"`
|
||||
UsedCredit float64 `json:"usedCredit" dc:"已使用信用额度"`
|
||||
PendingRepayment float64 `json:"pendingRepayment" dc:"待还款金额"`
|
||||
Status int `json:"status" dc:"状态: 0-正常, 1-禁用"`
|
||||
TenantId string `json:"tenantId" dc:"租户ID"`
|
||||
CreatedDept int64 `json:"createdDept" dc:"创建部门"`
|
||||
CreatedBy int64 `json:"createdBy" dc:"创建者"`
|
||||
CreatedBySumma *hook.MemberSumma `json:"createdBySumma" dc:"创建者摘要信息"`
|
||||
CreatedAt *gtime.Time `json:"createdAt" dc:"创建时间"`
|
||||
UpdatedBy int64 `json:"updatedBy" dc:"更新者"`
|
||||
UpdatedBySumma *hook.MemberSumma `json:"updatedBySumma" dc:"更新者摘要信息"`
|
||||
UpdatedAt *gtime.Time `json:"updatedAt" dc:"更新时间"`
|
||||
}
|
||||
|
||||
// TAgentBalanceExportModel 导出企业客户财务信息
|
||||
type TAgentBalanceExportModel struct {
|
||||
Id int64 `json:"id" dc:"账户ID"`
|
||||
DeptId int64 `json:"deptId" dc:"机构ID"`
|
||||
Balance float64 `json:"balance" dc:"账户余额"`
|
||||
WithdrawAmount float64 `json:"withdrawAmount" dc:"可提现金额"`
|
||||
WithdrawAmountStatus int `json:"withdrawAmountStatus" dc:"可提现金额状态: 1-正常, 0-冻结"`
|
||||
InvoiceAmount float64 `json:"invoiceAmount" dc:"已开票金额"`
|
||||
CanInvoiceAmount float64 `json:"canInvoiceAmount" dc:"可开票金额"`
|
||||
CreditLimit float64 `json:"creditLimit" dc:"信用额度"`
|
||||
UsedCredit float64 `json:"usedCredit" dc:"已使用信用额度"`
|
||||
PendingRepayment float64 `json:"pendingRepayment" dc:"待还款金额"`
|
||||
Status int `json:"status" dc:"状态: 0-正常, 1-禁用"`
|
||||
TenantId string `json:"tenantId" dc:"租户ID"`
|
||||
CreatedDept int64 `json:"createdDept" dc:"创建部门"`
|
||||
CreatedBy int64 `json:"createdBy" dc:"创建者"`
|
||||
CreatedAt *gtime.Time `json:"createdAt" dc:"创建时间"`
|
||||
UpdatedBy int64 `json:"updatedBy" dc:"更新者"`
|
||||
UpdatedAt *gtime.Time `json:"updatedAt" dc:"更新时间"`
|
||||
}
|
||||
|
||||
// TAgentBalanceStatusParam 更新企业客户财务信息状态
|
||||
type TAgentBalanceStatusParam struct {
|
||||
Id int64 `json:"id" v:"required#账户ID不能为空" dc:"账户ID"`
|
||||
Status int `json:"status" dc:"状态"`
|
||||
}
|
||||
|
||||
func (in *TAgentBalanceStatusParam) Filter(ctx context.Context) (err error) {
|
||||
if in.Id <= 0 {
|
||||
err = gerror.New("账户ID不能为空")
|
||||
return
|
||||
}
|
||||
|
||||
if in.Status <= 0 {
|
||||
err = gerror.New("状态不能为空")
|
||||
return
|
||||
}
|
||||
|
||||
if !slices.Contains(consts.StatusSlice, in.Status) {
|
||||
err = gerror.New("状态不正确")
|
||||
return
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
type TAgentBalanceStatusModel struct{}
|
||||
|
||||
type TAgentBalanceTrendParam struct {
|
||||
StartMonth string `json:"startMonth" dc:"开始月份,格式YYYY-MM"`
|
||||
EndMonth string `json:"endMonth" dc:"结束月份,格式YYYY-MM"`
|
||||
AccountType string `json:"accountType" dc:"账户类型:1 盈利账户,2消费账户 默认1"`
|
||||
}
|
||||
|
||||
func (in *TAgentBalanceTrendParam) Filter(ctx context.Context) (err error) {
|
||||
return
|
||||
}
|
||||
|
||||
type TAgentBalanceChartSeries struct {
|
||||
Name string `json:"name" dc:"折线名称"`
|
||||
Values []float64 `json:"values" dc:"折线数据"`
|
||||
}
|
||||
|
||||
type TAgentBalanceChartData struct {
|
||||
Labels []string `json:"labels" dc:"月份标签"`
|
||||
Series []*TAgentBalanceChartSeries `json:"series" dc:"折线数据"`
|
||||
}
|
||||
Reference in New Issue
Block a user