实现商户注册、管理员审核商户申请接口

This commit is contained in:
2025-06-04 15:10:56 +08:00
parent 00b889cfcc
commit caf3d42fe5
63 changed files with 1195 additions and 294 deletions

View File

@ -0,0 +1,80 @@
package model
import (
"github.com/gogf/gf/v2/os/gtime"
)
// Merchant 商户信息
type Merchant struct {
Id int64 `json:"id" orm:"id,primary"` // 商户ID
Name string `json:"name" orm:"name,not null"` // 商户名称
BusinessLicense string `json:"businessLicense" orm:"business_license"` // 营业执照号
LegalPerson string `json:"legalPerson" orm:"legal_person"` // 法人姓名
ContactName string `json:"contactName" orm:"contact_name"` // 联系人姓名
ContactPhone string `json:"contactPhone" orm:"contact_phone"` // 联系人电话
ContactEmail string `json:"contactEmail" orm:"contact_email"` // 联系人邮箱
Address string `json:"address" orm:"address"` // 商户地址
Status int `json:"status" orm:"status,default:1"` // 状态1=正常2=禁用
ExpireAt *gtime.Time `json:"expireAt" orm:"expire_at"` // 服务到期时间
ApplicationReason int64 `json:"applicationReason" orm:"application_reason"` // 申请理由
CreatedBy int64 `json:"createdBy" orm:"created_by"` // 创建人ID
CreatedByType int `json:"createdByType" orm:"created_by_type"` // 创建人类型1=系统管理员2=商户注册
AuditStatus int `json:"auditStatus" orm:"audit_status,default:0"` // 审核状态0=待审核1=审核通过2=审核拒绝
AuditBy int64 `json:"auditBy" orm:"audit_by"` // 审核人ID
AuditAt *gtime.Time `json:"auditAt" orm:"audit_at"` // 审核时间
AuditRemark string `json:"auditRemark" orm:"audit_remark"` // 审核备注
RejectReason string `json:"rejectReason" orm:"reject_reason"` // 拒绝原因
}
// MerchantCreateIn 创建商户请求
type MerchantCreateIn struct {
Name string
BusinessLicense string
LegalPerson string
ContactName string
ContactPhone string
ContactEmail string
Address string
ApplicationReason int64
}
// MerchantUpdateIn 更新商户请求
type MerchantUpdateIn struct {
Id int64
Name string
BusinessLicense string
LegalPerson string
ContactName string
ContactPhone string
ContactEmail string
Address string
Status int
ExpireAt *gtime.Time
}
// MerchantAuditIn 审核商户请求
type MerchantAuditIn struct {
AdminId int64
Id int64
AuditStatus int
AuditRemark string
RejectReason string
}
type MerchantAuditOut struct {
}
// MerchantOut 商户响应
type MerchantOut struct {
*Merchant
}
type MerchantListIn struct {
Page int
Size int
Status int
AuditStatus int
}
type MerchantListOut struct {
List []Merchant
Total int
}