mirror of
https://github.com/mindoc-org/mindoc.git
synced 2025-12-21 19:29:53 +08:00
完善功能
This commit is contained in:
@@ -1,20 +1,6 @@
|
||||
package models
|
||||
|
||||
import "github.com/astaxie/beego/orm"
|
||||
|
||||
type Model struct {
|
||||
|
||||
}
|
||||
|
||||
func (m *Model) Find(id int) error {
|
||||
o := orm.NewOrm()
|
||||
|
||||
return o.Read(m)
|
||||
}
|
||||
|
||||
func (m *Model) Insert() error {
|
||||
o := orm.NewOrm()
|
||||
_,err := o.Insert(m)
|
||||
|
||||
return err
|
||||
}
|
||||
Reference in New Issue
Block a user