feat: 授权管理改为设置卡类价格,代理管理增加消费列

This commit is contained in:
2026-05-07 00:28:52 +08:00
parent 7646bd2c88
commit e7e7631fa5
9 changed files with 74 additions and 56 deletions
+5 -3
View File
@@ -27,9 +27,10 @@ type User struct {
ApiCallsResetAt *time.Time `json:"api_calls_reset_at"`
ApiToken string `gorm:"size:64" json:"api_token"`
ParentAgentID *uint `gorm:"index" json:"parent_agent_id"`
CanCreateAgent bool `gorm:"default:false" json:"can_create_agent"`
Balance float64 `gorm:"default:0" json:"balance"`
ParentAgentID *uint `gorm:"index" json:"parent_agent_id"`
CanCreateAgent bool `gorm:"default:false" json:"can_create_agent"`
Balance float64 `gorm:"default:0" json:"balance"`
TotalConsumption float64 `gorm:"default:0" json:"total_consumption"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
@@ -626,6 +627,7 @@ type AgentApplicationCardType struct {
AgentApplicationID uint `json:"agent_application_id"`
CardTypeID uint `json:"card_type_id"`
CanGenerate bool `gorm:"default:false" json:"can_generate"`
Price float64 `gorm:"type:decimal(10,2);default:0" json:"price"`
CreatedAt time.Time `json:"created_at"`
DeletedAt gorm.DeletedAt `gorm:"index" json:"-"`