zhangqian
2023-12-08 0ac236432543589b51613919d37cc7b7c07b9bf3
debug
1个文件已修改
6 ■■■■ 已修改文件
model/model.go 6 ●●●● 补丁 | 查看 | 原始文档 | 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 {