feat: integrated Alipay payment module

This commit is contained in:
RockYang
2023-11-06 17:55:46 +08:00
parent a4baa29678
commit 848a10c3a8
26 changed files with 1599 additions and 0 deletions

21
api/store/model/order.go Normal file
View File

@@ -0,0 +1,21 @@
package model
import (
"chatplus/core/types"
"gorm.io/gorm"
)
// Order 充值订单
type Order struct {
BaseModel
UserId uint
ProductId uint
Mobile string
OrderNo string
Subject string
Amount float64
Status types.OrderStatus
Remark string
PayTime int64
DeletedAt gorm.DeletedAt
}

View File

@@ -0,0 +1,14 @@
package model
// Product 充值产品
type Product struct {
BaseModel
Name string
Price float64
Discount float64
Days int
Calls int
Enabled bool
Sales int
SortNum int
}

View File

@@ -16,4 +16,6 @@ type User struct {
Status bool `gorm:"default:true"` // 当前状态
LastLoginAt int64 // 最后登录时间
LastLoginIp string // 最后登录 IP
Vip bool // 是否 VIP 会员
Tokens int
}