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

- 将ID字段名改为Id以符合Go语言命名约定
- 保持gorm标签和json标签的一致性
- 确保数据库映射功能不受影响
main v1.0.1027
maguodong 2026-03-28 16:21:02 +08:00
parent 1e18be8326
commit 828e19de93
1 changed files with 1 additions and 1 deletions

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"`
}