refactor(database): 修改BaseModel中的ID字段命名规范

- 将ID字段名改为Id以符合Go语言命名约定
- 保持gorm标签和json标签的一致性
- 确保数据库映射功能不受影响
This commit is contained in:
maguodong
2026-03-28 16:21:02 +08:00
parent 1e18be8326
commit 828e19de93
+1 -1
View File
@@ -8,7 +8,7 @@ import (
// BaseModel 基础模型
type BaseModel struct {
ID uint `gorm:"column:id;primaryKey;autoIncrement;common:主键ID" json:"id"`
Id uint `gorm:"column:id;primaryKey;autoIncrement;common:主键ID" json:"id"`
CreateTime string `gorm:"autoCreateTime;column:create_time;type:datetime" json:"create_time"`
UpdateTime string `gorm:"autoUpdateTime;column:update_time;type:datetime" json:"update_time"`
}