diff --git a/models/accesslog.go b/models/accesslog.go index 8a34867e7..ca5b52370 100644 --- a/models/accesslog.go +++ b/models/accesslog.go @@ -29,11 +29,11 @@ type AccessLog struct { GUID string `orm:"column(GUID)" json:"guid"` Operation string `orm:"column(operation)" json:"operation"` OpTime time.Time `orm:"column(op_time)" json:"op_time"` - Username string - Keywords string + Username string `json:"username"` + Keywords string `json:"keywords"` BeginTime time.Time - BeginTimestamp int64 + BeginTimestamp int64 `json:"begin_timestamp"` EndTime time.Time - EndTimestamp int64 + EndTimestamp int64 `json:"end_timestamp"` } diff --git a/models/user.go b/models/user.go index 80d8eb004..b140aeee1 100644 --- a/models/user.go +++ b/models/user.go @@ -28,8 +28,8 @@ type User struct { Realname string `orm:"column(realname)" json:"realname"` Comment string `orm:"column(comment)" json:"comment"` Deleted int `orm:"column(deleted)" json:"deleted"` - // Rolename string `json:role_name` - // RoleID int `json:"role_id"` + Rolename string `json:"role_name"` + RoleID int `json:"role_id"` // RoleList []Role `json:"role_list"` HasAdminRole int `orm:"column(sysadmin_flag)" json:"has_admin_role"` ResetUUID string `orm:"column(reset_uuid)" json:"reset_uuid"`