package
Version:
v0.1.2
Opens a new window with list of versions in this module.
Published: Jun 9, 2022
License: MIT
Opens a new window with license information.
Imports: 9
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
CreateId
*
- @Description: 创建一个分布式ID(雪花ID)
- @return DistributedId
CreateTime
*
- @Description: 创建一个时间戳
- @return Time
Env 类型(string类型的别名)
const (
ENV_DEV Env = "dev"
ENV_PRO Env = "pro"
ENV_FAT Env = "fat"
)
type Model struct {
ID dtype.DistributedId `json:"id,omitempty" gorm:"column:id;primary_key;"`
CreateTime dtype.Time `json:"createTime,omitempty" gorm:"column:create_time;comment:创建时间;"`
UpdateTime *dtype.Time `json:"updateTime,omitempty" gorm:"column:update_time;comment:更新时间;"`
}
Source Files
¶
Directories
¶
Click to show internal directories.
Click to hide internal directories.