mirror of http://gitlab.batiao8.com/yic/film.git
createDate
This commit is contained in:
parent
dd327dc690
commit
3e2b24108e
|
@ -27,12 +27,14 @@ type Order struct {
|
|||
CinemaName string
|
||||
MovieName string
|
||||
Address string
|
||||
CreateDate string
|
||||
CreateTime int64
|
||||
UpdateTime int64
|
||||
}
|
||||
|
||||
func AddOrder(o *Order) (int64, error) {
|
||||
o.CreateTime = time.Now().Unix()
|
||||
o.CreateDate = time.Now().Format("2006-01-02")
|
||||
res := db.Table(tableNameOrder).Create(o)
|
||||
return o.Id, res.Error
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue