feat:完善项目信息
This commit is contained in:
@ -21,7 +21,7 @@ type IModel interface {
|
||||
|
||||
// Model
|
||||
type Model struct {
|
||||
ID uint64 `gorm:"column:id;primaryKey;autoIncrement;comment:主键" json:"-" form:"id"`
|
||||
ID uint64 `gorm:"column:id;primaryKey;autoIncrement;comment:主键" json:"-"`
|
||||
|
||||
Database string `json:"-" gorm:"-"`
|
||||
}
|
||||
@ -74,6 +74,9 @@ func (m *Model) GetID() uint64 {
|
||||
}
|
||||
|
||||
func (m *Model) GetEncodeID() string {
|
||||
if m.ID <= 0 {
|
||||
return ""
|
||||
}
|
||||
return utils.HASHIDEncode(int(m.ID))
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user