improve model feature

This commit is contained in:
John
2019-08-30 20:29:12 +08:00
parent a31108e753
commit ee89a06b3e
17 changed files with 232 additions and 53 deletions

View File

@ -0,0 +1,4 @@
# MySQL数据库配置
[database]
link = "mysql:root:12345678@tcp(127.0.0.1:3306)/test"

View File

@ -0,0 +1,15 @@
package main
import (
"github.com/gogf/gf/.example/frame/mvc/model/test"
"github.com/gogf/gf/frame/g"
)
func main() {
g.DB().SetDebug(true)
user, err := test.ModelUser().One()
g.Dump(err)
g.Dump(user)
user.Password = "1"
g.Dump(user.Update())
}