1 Star 0 Fork 0

ichub / goconfig

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
ModelBase.go 691 Bytes
一键复制 编辑 原始数据 按行查看 历史
leijmdas 提交于 2024-04-29 20:32 . add
package basemodel
import jsoniter "github.com/json-iterator/go"
type ModelBase struct {
// gorm.Model
// Id *uint64 `gorm:"primary_key" json:"id"`
CreatedAt *LocalDateInt `json:"created_at"`
UpdatedAt *LocalDateInt `json:"updated_at"`
DeletedAt *LocalDateInt `gorm:"column:deleted_at;type:timestamp" sql:"index" json:"-"`
CreatedBy *uint64 `json:"create_by"`
UpdatedBy *uint64 `json:"updated_by"`
DeletedBy *uint64 `json:"deleted_by"`
}
func (entity *ModelBase) String() string {
s, _ := jsoniter.Marshal(entity)
return string(s)
}
func (entity *ModelBase) ToString() string {
s, _ := jsoniter.MarshalIndent(entity, "", " ")
return string(s)
}
1
https://gitee.com/ichub/goconfig.git
git@gitee.com:ichub/goconfig.git
ichub
goconfig
goconfig
v1.0.407

搜索帮助