修改dashboard页面
This commit is contained in:
25
pkg/model/num.go
Normal file
25
pkg/model/num.go
Normal file
@ -0,0 +1,25 @@
|
||||
package model
|
||||
|
||||
import (
|
||||
"next-terminal/pkg/config"
|
||||
)
|
||||
|
||||
type Num struct {
|
||||
I string `gorm:"primary_key" json:"i"`
|
||||
}
|
||||
|
||||
func (r *Num) TableName() string {
|
||||
return "nums"
|
||||
}
|
||||
|
||||
func FindAllTemp() (o []Num) {
|
||||
if config.DB.Find(&o).Error != nil {
|
||||
return nil
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func CreateNewTemp(o *Num) (err error) {
|
||||
err = config.DB.Create(o).Error
|
||||
return
|
||||
}
|
Reference in New Issue
Block a user