Update post.go

This commit is contained in:
wenjianzhang
2020-03-31 21:47:06 +08:00
committed by GitHub
parent f8013301ad
commit ffbeacb25a
+1
View File
@@ -45,6 +45,7 @@ type Post struct {
func (e *Post) Create() (Post, error) {
var doc Post
e.CreateTime = utils.GetCurrntTime()
e.UpdateTime = utils.GetCurrntTime()
result := orm.Eloquent.Table("sys_post").Create(&e)
if result.Error != nil {
err := result.Error