zhangqian
2023-12-08 b9abe45f791bea70a059e37186907190afcec350
debug
1个文件已修改
5 ■■■■■ 已修改文件
model/model.go 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
model/model.go
@@ -11,7 +11,8 @@
type BigID uint
type CommonModel struct {
    ID        BigID `gorm:"primary_key"`
    ID        uint  `gorm:"primary_key" json:"-"`
    BigInt    BigID `json:"ID"`
    CreatedAt time.Time
    UpdatedAt time.Time
    DeletedAt *time.Time `sql:"index"`
@@ -24,7 +25,7 @@
            // 处理 ID 为负数的情况(可选)
            id = snowflake.GenerateID()
        }
        c.ID = BigID(id)
        c.ID = uint(id)
    }
}