feat:完善项目信息

This commit is contained in:
henry
2022-01-06 17:11:57 +08:00
parent 1b0f71735b
commit a92801b1ce
29 changed files with 815 additions and 623 deletions

View File

@ -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))
}