zhangqian
2023-12-08 0ac236432543589b51613919d37cc7b7c07b9bf3
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 {