- all db orm use beego orm, don't use gorm anymore.

This commit is contained in:
gazebo
2018-09-08 12:55:39 +08:00
parent 711013fab4
commit 8c130a15a4
28 changed files with 780 additions and 448 deletions

View File

@@ -1,24 +1,12 @@
package model
import "time"
import (
"time"
)
type ModelO struct {
ID int `gorm:"primary_key" json:"id"`
CreatedAt time.Time `json:"createdAt"`
UpdatedAt time.Time `json:"updatedAt"`
DeletedAt *time.Time `sql:"index"`
LastOperator string `gorm:"type:varchar(32)" json:"lastOperator"` // 最后操作员
}
type ModelIDCU struct {
ID int `gorm:"primary_key" json:"id"`
CreatedAt time.Time `json:"createdAt"`
UpdatedAt time.Time `json:"updatedAt"`
}
type ModelIDCUO struct {
ID int `gorm:"primary_key" json:"id"`
CreatedAt time.Time `json:"createdAt"`
UpdatedAt time.Time `json:"updatedAt"`
LastOperator string `gorm:"type:varchar(32)" json:"lastOperator"` // 最后操作员
type ModelIDCUL struct {
ID int `orm:"column(id)" json:"id"`
CreatedAt time.Time `orm:"auto_now_add;type(datetime)" json:"createdAt"`
UpdatedAt time.Time `orm:"auto_now;type(datetime)" json:"updatedAt"`
LastOperator string `orm:"size(32)" json:"lastOperator"` // 最后操作员
}