refactor(database): 修改BaseModel中的ID字段命名规范
- 将ID字段名改为Id以符合Go语言命名约定 - 保持gorm标签和json标签的一致性 - 确保数据库映射功能不受影响main v1.0.1027
parent
1e18be8326
commit
828e19de93
|
|
@ -8,7 +8,7 @@ import (
|
||||||
|
|
||||||
// BaseModel 基础模型
|
// BaseModel 基础模型
|
||||||
type BaseModel struct {
|
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"`
|
CreateTime string `gorm:"autoCreateTime;column:create_time;type:datetime" json:"create_time"`
|
||||||
UpdateTime string `gorm:"autoUpdateTime;column:update_time;type:datetime" json:"update_time"`
|
UpdateTime string `gorm:"autoUpdateTime;column:update_time;type:datetime" json:"update_time"`
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue