feat: 初始化核心应用结构,新增循环交易、短信、分配规则和用户设置等服务,并更新相关依赖和配置。

This commit is contained in:
2026-02-02 01:41:51 +08:00
parent 49fcce531d
commit fa8a35a85b
13 changed files with 253 additions and 37 deletions

View File

@@ -8,14 +8,14 @@ import (
// Feature: accounting-feature-upgrade
// Validates: Requirements 5.4, 6.5, 8.25-8.27
type UserSettings struct {
ID uint `gorm:"primarykey" json:"id"`
UserID *uint `gorm:"uniqueIndex" json:"user_id,omitempty"`
PreciseTimeEnabled bool `gorm:"default:true" json:"precise_time_enabled"`
IconLayout string `gorm:"size:10;default:'five'" json:"icon_layout"` // four, five, six
ImageCompression string `gorm:"size:10;default:'medium'" json:"image_compression"` // low, medium, high
ShowReimbursementBtn bool `gorm:"default:true" json:"show_reimbursement_btn"`
ShowRefundBtn bool `gorm:"default:true" json:"show_refund_btn"`
CurrentLedgerID *uint `gorm:"index" json:"current_ledger_id,omitempty"`
ID uint `gorm:"primarykey" json:"id"`
UserID *uint `gorm:"uniqueIndex" json:"user_id,omitempty"`
PreciseTimeEnabled bool `gorm:"default:true" json:"precise_time_enabled"`
IconLayout string `gorm:"size:10;default:'five'" json:"icon_layout"` // four, five, six
ImageCompression string `gorm:"size:10;default:'medium'" json:"image_compression"` // low, medium, high
ShowReimbursementBtn bool `gorm:"default:true" json:"show_reimbursement_btn"`
ShowRefundBtn bool `gorm:"default:true" json:"show_refund_btn"`
CurrentLedgerID *uint `gorm:"index" json:"current_ledger_id,omitempty"`
// Default account settings
// Feature: financial-core-upgrade
@@ -23,6 +23,8 @@ type UserSettings struct {
DefaultExpenseAccountID *uint `gorm:"index" json:"default_expense_account_id,omitempty"`
DefaultIncomeAccountID *uint `gorm:"index" json:"default_income_account_id,omitempty"`
Phone string `gorm:"size:20" json:"phone,omitempty"` // For SMS notifications
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`