自动关注
This commit is contained in:
35
business/model/event.go
Normal file
35
business/model/event.go
Normal file
@@ -0,0 +1,35 @@
|
||||
package model
|
||||
|
||||
import "time"
|
||||
|
||||
type OperateEvent struct {
|
||||
ID int64 `orm:"column(id)" json:"id"`
|
||||
CreatedAt time.Time `orm:"auto_now_add;type(datetime)" json:"createdAt"`
|
||||
LastOperator string `orm:"size(32)" json:"lastOperator"` // 最后操作员
|
||||
AccessUUID string `orm:"column(access_uuid)" json:"accessUUID"`
|
||||
UserID string `orm:"column(user_id)" json:"userID"`
|
||||
APIFunction string `orm:"column(api_function)" json:"apiFunction"`
|
||||
}
|
||||
|
||||
func (v *OperateEvent) TableIndex() [][]string {
|
||||
return [][]string{
|
||||
[]string{"AccessUUID", "UserID"},
|
||||
}
|
||||
}
|
||||
|
||||
type OperateEventDetail struct {
|
||||
ID int64 `orm:"column(id)" json:"id"`
|
||||
OperateType int `json:"operateType"` // 1为修改,2为新增,4为删除
|
||||
ThingID int `orm:"column(thing_id)" json:"thingID"`
|
||||
ThingType int `json:"thingType"` //各字段类型
|
||||
StoreID int `orm:"column(store_id)" json:"storeID"`
|
||||
AccessUUID string `orm:"column(access_uuid)" json:"accessUUID"`
|
||||
BeforeData string `orm:"size(32)" json:"beforeData"`
|
||||
AfterData string `orm:"size(32)" json:"afterData"`
|
||||
}
|
||||
|
||||
func (v *OperateEventDetail) TableIndex() [][]string {
|
||||
return [][]string{
|
||||
[]string{"AccessUUID", "ThingID", "StoreID"},
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user