model/model.go | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
model/model.go
@@ -12,7 +12,7 @@ type CommonModel struct { ID uint `gorm:"primary_key" json:"-"` BigInt BigID `json:"ID"` Id BigID `json:"ID"` CreatedAt time.Time UpdatedAt time.Time DeletedAt *time.Time `sql:"index"` @@ -27,10 +27,6 @@ } c.ID = uint(id) } } func (c *CommonModel) AfterFind(db *gorm.DB) error { c.BigInt = BigID(c.ID) return nil } func (id *BigID) UnmarshalJSON(b []byte) error {