refactor🎨 :统一格式

This commit is contained in:
wenjianzhang
2021-06-03 19:39:19 +08:00
parent 9a49700d09
commit 4dfd4e4647
14 changed files with 324 additions and 414 deletions
+3 -1
View File
@@ -11,10 +11,12 @@ type ControlBy struct {
UpdateBy int `json:"updateBy" gorm:"index;comment:更新者"`
}
// SetCreateBy 设置创建人id
func (e *ControlBy) SetCreateBy(createBy int) {
e.CreateBy = createBy
}
// SetUpdateBy 设置修改人id
func (e *ControlBy) SetUpdateBy(updateBy int) {
e.UpdateBy = updateBy
}
@@ -27,4 +29,4 @@ type ModelTime struct {
CreatedAt time.Time `json:"createdAt" gorm:"comment:创建时间"`
UpdatedAt time.Time `json:"updatedAt" gorm:"comment:最后更新时间"`
DeletedAt gorm.DeletedAt `json:"-" gorm:"index;comment:删除时间"`
}
}