feat: 实现分类管理功能,包括数据模型、仓库层、服务层和数据库初始化脚本
This commit is contained in:
@@ -304,6 +304,7 @@ type Category struct {
|
||||
UserID uint `gorm:"not null;index" json:"user_id"`
|
||||
Name string `gorm:"size:50;not null" json:"name"`
|
||||
Icon string `gorm:"size:50" json:"icon"`
|
||||
Color string `gorm:"size:20" json:"color"` // HEX color code (e.g., #FF6B35)
|
||||
Type CategoryType `gorm:"size:20;not null" json:"type"` // income or expense
|
||||
ParentID *uint `gorm:"index" json:"parent_id,omitempty"`
|
||||
SortOrder int `gorm:"default:0" json:"sort_order"`
|
||||
|
||||
Reference in New Issue
Block a user