This commit is contained in:
solosw
2026-01-05 14:11:34 +08:00
parent 35ef825371
commit 99b11b04e4
658 changed files with 99266 additions and 0 deletions
+20
View File
@@ -0,0 +1,20 @@
package models
import (
"time"
)
// ProductCategory 商品分类表
type ProductCategory struct {
ID uint `gorm:"primaryKey;autoIncrement" json:"id"`
CategoryName string `gorm:"type:varchar(100);not null;comment:分类名称" json:"category_name" binding:"required"`
CategoryIcon string `gorm:"type:varchar(255);comment:分类图标URL" json:"category_icon"`
SortOrder int `gorm:"type:int;not null;default:0;comment:排序序号" json:"sort_order"`
Status uint8 `gorm:"type:tinyint;not null;default:1;comment:状态:0禁用,1启用" json:"status"`
CreatedAt time.Time `gorm:"type:timestamp;default:CURRENT_TIMESTAMP" json:"created_at"`
UpdatedAt time.Time `gorm:"type:timestamp;default:CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP" json:"updated_at"`
}
func (ProductCategory) TableName() string {
return "product_categories"
}