修改分页返回数据结构体
This commit is contained in:
@ -23,7 +23,7 @@ type Asset struct {
|
||||
Owner string `gorm:"index" json:"owner"`
|
||||
}
|
||||
|
||||
type AssetVo struct {
|
||||
type AssetForPage struct {
|
||||
ID string `json:"id"`
|
||||
Name string `json:"name"`
|
||||
IP string `json:"ip"`
|
||||
|
@ -12,7 +12,7 @@ type Command struct {
|
||||
Owner string `gorm:"index" json:"owner"`
|
||||
}
|
||||
|
||||
type CommandVo struct {
|
||||
type CommandForPage struct {
|
||||
ID string `gorm:"primary_key" json:"id"`
|
||||
Name string `json:"name"`
|
||||
Content string `json:"content"`
|
||||
|
@ -20,7 +20,7 @@ func (r *Credential) TableName() string {
|
||||
return "credentials"
|
||||
}
|
||||
|
||||
type CredentialVo struct {
|
||||
type CredentialForPage struct {
|
||||
ID string `json:"id"`
|
||||
Name string `json:"name"`
|
||||
Type string `json:"type"`
|
||||
|
@ -14,7 +14,7 @@ type LoginLog struct {
|
||||
Remember bool `json:"remember"`
|
||||
}
|
||||
|
||||
type LoginLogVo struct {
|
||||
type LoginLogForPage struct {
|
||||
ID string `json:"id"`
|
||||
UserId string `json:"userId"`
|
||||
UserName string `json:"userName"`
|
||||
|
@ -32,7 +32,7 @@ func (r *Session) TableName() string {
|
||||
return "sessions"
|
||||
}
|
||||
|
||||
type SessionVo struct {
|
||||
type SessionForPage struct {
|
||||
ID string `json:"id"`
|
||||
Protocol string `json:"protocol"`
|
||||
IP string `json:"ip"`
|
||||
|
@ -17,7 +17,7 @@ type User struct {
|
||||
Mail string `json:"mail"`
|
||||
}
|
||||
|
||||
type UserVo struct {
|
||||
type UserForPage struct {
|
||||
ID string `json:"id"`
|
||||
Username string `json:"username"`
|
||||
Nickname string `json:"nickname"`
|
||||
|
@ -5,10 +5,16 @@ import (
|
||||
)
|
||||
|
||||
type UserGroup struct {
|
||||
ID string `gorm:"primary_key" json:"id"`
|
||||
ID string `gorm:"primary_key" json:"id"`
|
||||
Name string `json:"name"`
|
||||
Created utils.JsonTime `json:"created"`
|
||||
}
|
||||
|
||||
type UserGroupForPage struct {
|
||||
ID string `json:"id"`
|
||||
Name string `json:"name"`
|
||||
Created utils.JsonTime `json:"created"`
|
||||
AssetCount int64 `gorm:"-" json:"assetCount"`
|
||||
AssetCount int64 `json:"assetCount"`
|
||||
}
|
||||
|
||||
func (r *UserGroup) TableName() string {
|
Reference in New Issue
Block a user