- 新增 CommunityFund / FundLog 模型(公户余额单行表 + 6种流水类型) - 新增 FundRepo 仓储(GetBalance / IncrBalance / CreateLog / ListLogs / WithTx) - 改造 EnergyService 五个方法:Energize 税收入公户、DeductOnRename/DeductOnDeletePost 入公户、RefundOnRenameReject 从公户支出、AdminAdjust 拆分为 admin_transfer/system_operation - 新增 ErrInsufficientFund 错误哨兵 - 管理后台新增公户余额展示 + 公户流水页面 + 域能调整资金来源选择 - 新增 energy.css / energy.js 前端交互 - 侧边栏新增公户流水入口
11 lines
303 B
Go
11 lines
303 B
Go
package model
|
||
|
||
import "time"
|
||
|
||
// CommunityFund 公户余额(单行表,id=1)
|
||
type CommunityFund struct {
|
||
ID uint `gorm:"primaryKey" json:"id"`
|
||
Balance int `gorm:"not null;default:0" json:"balance"` // 余额(×10,允许负数)
|
||
UpdatedAt time.Time `json:"updated_at"`
|
||
}
|