refactor(database): 修改BaseModel中的ID字段命名规范
- 将ID字段名改为Id以符合Go语言命名约定 - 保持gorm标签和json标签的一致性 - 确保数据库映射功能不受影响
This commit is contained in:
@@ -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"`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user