58 lines
1.9 KiB
Go
58 lines
1.9 KiB
Go
package v1
|
|
|
|
import (
|
|
"likedream-goframe/internal/framework/ent2"
|
|
|
|
"github.com/shopspring/decimal"
|
|
)
|
|
|
|
type UserMenuRes struct {
|
|
ID int64 `json:"id"`
|
|
Label string `json:"label"`
|
|
Name string `json:"name"`
|
|
Type string `json:"type"`
|
|
Link string `json:"link"`
|
|
Permission string `json:"permission"`
|
|
Route string `json:"route"`
|
|
Component string `json:"component"`
|
|
Hidden bool `json:"hidden"`
|
|
KeepAlive bool `json:"keepAlive"`
|
|
Icon string `json:"icon"`
|
|
Children []*UserMenuRes `json:"children"`
|
|
Order uint `json:"order"`
|
|
}
|
|
|
|
type UserPermissionRes struct {
|
|
Menus []*UserMenuRes `json:"menus"`
|
|
Permissions []string `json:"permissions"`
|
|
}
|
|
|
|
type UserProfileRes struct {
|
|
ID int64 `json:"id"`
|
|
Username string `json:"username"`
|
|
Email string `json:"email"`
|
|
Avatar string `json:"avatar"`
|
|
ParentUsername string `json:"parent_username"`
|
|
ParentEmail string `json:"parent_email"`
|
|
Level int `json:"level"`
|
|
Rate decimal.Decimal `json:"rate"`
|
|
Balance decimal.Decimal `json:"balance"`
|
|
InviteCode string `json:"invite_code"`
|
|
InviteCount int `json:"invite_count"`
|
|
InviteCashback decimal.Decimal `json:"invite_cashback"`
|
|
}
|
|
|
|
type InviteCashbackRes struct {
|
|
Total int `json:"total"`
|
|
MonthTotal int `json:"month_total"`
|
|
TotalCashback decimal.Decimal `json:"total_cashback"`
|
|
}
|
|
|
|
type UserInviteRes struct {
|
|
Id int64 `json:"id"`
|
|
Username string `json:"username"`
|
|
Email string `json:"email"`
|
|
CreatedTime *ent2.CustomTime `json:"created_time"`
|
|
Cashback decimal.Decimal `json:"cashback"`
|
|
}
|