1 Star 0 Fork 1

可乐烛光烟 / go-utils

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
model.go 690 Bytes
一键复制 编辑 原始数据 按行查看 历史
可乐烛光烟 提交于 2022-11-09 00:21 . Initial commit
/*
* @Author: i@rysa.cn
* @Date: 2021-09-05 17:39:47
* @LastEditTime: 2021-09-05 19:12:12
* @LastEditors: i@rysa.cn
* @Description:
* @FilePath: /go-utils/DB/model.go
*/
package DB
import (
"time"
"gorm.io/gorm"
)
// 添加软删除
type BaseModel struct {
Id int64 `json:"id" gorm:"primaryKey"`
CreatedAt *time.Time `json:"created_at,omitempty" `
UpdatedAt *time.Time `json:"updated_at,omitempty" `
DeletedAt *gorm.DeletedAt `json:"deleted_at,omitempty" `
}
type CommModel struct {
Id int64 `json:"id" gorm:"primaryKey"`
CreatedAt *time.Time `json:"created_at,omitempty" `
UpdatedAt *time.Time `json:"updated_at,omitempty" `
}
1
https://gitee.com/rysa/go-utils.git
git@gitee.com:rysa/go-utils.git
rysa
go-utils
go-utils
v1.1.0

搜索帮助

53164aa7 5694891 3bd8fe86 5694891