feat: 通用授权后台、离线证、Waffo 支付页与仪表盘加强
支持多产品计划展示、LICOFF 离线签发、支付独立配置与调试,以及分析看板;同步更新 README 与集成文档。 Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
0966375076
commit
8cc2c83f9d
41 files changed
+3177
-332
No files matched your search
@@ -4,7 +4,7 @@ package dto
|
||||
type LicenseCreate struct {
|
||||
CustomerID uint `json:"customer_id" binding:"required"`
|
||||
ProductID uint `json:"product_id" binding:"required"`
|
||||
Duration int `json:"duration" binding:"required"` // 30/90/180/365/730/1095/1825/0(永久)
|
||||
Duration int `json:"duration"` // 30/90/180/365/…/0(永久);0 合法,勿用 binding:required
|
||||
MaxActivations int `json:"max_activations"`
|
||||
IsTrial bool `json:"is_trial"`
|
||||
TrialDays int `json:"trial_days"`
|
||||
@@ -26,6 +26,10 @@ type LicenseRevoke struct {
|
||||
type LicenseResponse struct {
|
||||
ID uint `json:"id"`
|
||||
LicenseKey string `json:"license_key"`
|
||||
LicenseKeyShort string `json:"license_key_short"` // 列表展示用短码,避免 LICOFF 撑爆表格 // Logan.Li
|
||||
Channel string `json:"channel"` // online | offline
|
||||
IsOffline bool `json:"is_offline"`
|
||||
DeviceID string `json:"device_id,omitempty"` // 离线证绑定设备
|
||||
CustomerID uint `json:"customer_id"`
|
||||
CustomerName string `json:"customer_name"`
|
||||
ProductID uint `json:"product_id"`
|
||||
@@ -102,3 +106,31 @@ type ActivationResponse struct {
|
||||
ActivatedAt string `json:"activated_at"`
|
||||
LastSeenAt string `json:"last_seen_at"`
|
||||
}
|
||||
|
||||
// OfflineLicenseCreate 管理端签发离线许可证请求 // Logan.Li
|
||||
type OfflineLicenseCreate struct {
|
||||
DeviceID string `json:"device_id" binding:"required"`
|
||||
Email string `json:"email"`
|
||||
CustomerID uint `json:"customer_id"`
|
||||
CustomerName string `json:"customer_name"`
|
||||
ProductCode string `json:"product_code"`
|
||||
PlanType string `json:"plan_type"` // trial | yearly(禁止 perpetual)
|
||||
DurationDays int `json:"duration_days"` // 1–365,默认 365;trial 上限 180
|
||||
Notes string `json:"notes"`
|
||||
}
|
||||
|
||||
// OfflineLicenseResponse 离线许可证签发结果 // Logan.Li
|
||||
type OfflineLicenseResponse struct {
|
||||
Serial string `json:"serial"`
|
||||
DeviceID string `json:"device_id"`
|
||||
Email string `json:"email,omitempty"`
|
||||
PlanType string `json:"plan_type"`
|
||||
ProductCode string `json:"product_code"`
|
||||
IssuedAt string `json:"issued_at"`
|
||||
ExpiresAt string `json:"expires_at"`
|
||||
Duration int `json:"duration_days"`
|
||||
MaxDevices int `json:"max_devices"`
|
||||
LicenseID uint `json:"license_id"`
|
||||
PublicKey string `json:"public_key_hex"`
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user