1. 首页应用图标同时支持 iconfont 和自定义上传图标

2. 所有模型外键字段都改成int(11) 而不是 bigint
This commit is contained in:
GeekMaster
2025-07-29 11:35:11 +08:00
parent c19b7db8c0
commit ff96fada02
19 changed files with 118 additions and 143 deletions

View File

@@ -7,16 +7,16 @@ import (
// PowerLog 算力消费日志
type PowerLog struct {
Id uint `gorm:"column:id;primaryKey;autoIncrement" json:"id"`
UserId uint `gorm:"column:user_id;type:int;not null;comment:用户ID" json:"user_id"`
Username string `gorm:"column:username;type:varchar(30);not null;comment:用户名" json:"username"`
Type types.PowerType `gorm:"column:type;type:tinyint(1);not null;comment:类型1充值2消费3退费" json:"type"`
Amount int `gorm:"column:amount;type:smallint;not null;comment:算力数值" json:"amount"`
Balance int `gorm:"column:balance;type:int;not null;comment:余额" json:"balance"`
Model string `gorm:"column:model;type:varchar(30);not null;comment:模型" json:"model"`
Remark string `gorm:"column:remark;type:varchar(512);not null;comment:备注" json:"remark"`
Mark types.PowerMark `gorm:"column:mark;type:tinyint(1);not null;comment:资金类型0支出1收入" json:"mark"`
CreatedAt time.Time `gorm:"column:created_at;type:datetime;not null;comment:创建时间" json:"created_at"`
Id uint `gorm:"column:id;primaryKey;autoIncrement" json:"id"`
UserId uint `gorm:"column:user_id;type:int(11);not null;comment:用户ID" json:"user_id"`
Username string `gorm:"column:username;type:varchar(30);not null;comment:用户名" json:"username"`
Type types.PowerType `gorm:"column:type;type:tinyint(1);not null;comment:类型1充值2消费3退费" json:"type"`
Amount int `gorm:"column:amount;type:smallint;not null;comment:算力数值" json:"amount"`
Balance int `gorm:"column:balance;type:int;not null;comment:余额" json:"balance"`
Model string `gorm:"column:model;type:varchar(255);not null;comment:模型" json:"model"`
Remark string `gorm:"column:remark;type:varchar(512);not null;comment:备注" json:"remark"`
Mark types.PowerMark `gorm:"column:mark;type:tinyint(1);not null;comment:资金类型0支出1收入" json:"mark"`
CreatedAt time.Time `gorm:"column:created_at;type:datetime;not null;comment:创建时间" json:"created_at"`
}
func (m *PowerLog) TableName() string {