- Implemented Invite management with creation, searching, and disabling functionalities. - Added Ledger overview for financial transactions with filtering options. - Developed Order Detail view for individual order insights and refund capabilities. - Created Orders management page with search, reset, and pagination features. - Enhanced user experience with toast notifications for actions and error handling.
52 lines
2.0 KiB
Go
52 lines
2.0 KiB
Go
package dto
|
||
|
||
import (
|
||
"time"
|
||
|
||
"quyun/v2/pkg/consts"
|
||
|
||
"go.ipao.vip/gen/types"
|
||
)
|
||
|
||
// MeResponse 当前登录用户信息(脱敏)。
|
||
type MeResponse struct {
|
||
// ID 用户ID(全局唯一)。
|
||
ID int64 `json:"id"`
|
||
// Username 用户名。
|
||
Username string `json:"username"`
|
||
// Roles 用户全局角色数组(如 user/super_admin 等)。
|
||
Roles types.Array[consts.Role] `json:"roles"`
|
||
// Status 用户状态(active/verified/banned 等)。
|
||
Status consts.UserStatus `json:"status"`
|
||
// StatusDescription 用户状态描述(便于前端展示)。
|
||
StatusDescription string `json:"status_description"`
|
||
// CreatedAt 用户创建时间。
|
||
CreatedAt time.Time `json:"created_at"`
|
||
// UpdatedAt 用户更新时间。
|
||
UpdatedAt time.Time `json:"updated_at"`
|
||
}
|
||
|
||
// MyTenantItem 当前用户可进入的租户条目(用于“选择租户进入后台”页面)。
|
||
type MyTenantItem struct {
|
||
// TenantID 租户ID(数值型主键)。
|
||
TenantID int64 `json:"tenant_id"`
|
||
// TenantCode 租户Code(路由使用:/t/:tenantCode/...)。
|
||
TenantCode string `json:"tenant_code"`
|
||
// TenantName 租户名称。
|
||
TenantName string `json:"tenant_name"`
|
||
// TenantStatus 租户状态(pending/verified/expired 等)。
|
||
TenantStatus consts.TenantStatus `json:"tenant_status"`
|
||
// TenantStatusDescription 租户状态描述(便于前端展示)。
|
||
TenantStatusDescription string `json:"tenant_status_description"`
|
||
|
||
// IsOwner 是否为租户Owner(tenants.user_id == 当前用户)。
|
||
// 说明:Owner 通常也在 tenant_users 里具备 tenant_admin 角色,但此字段更直观。
|
||
IsOwner bool `json:"is_owner"`
|
||
// MemberRoles 当前用户在该租户下的角色(tenant_admin/member 等)。
|
||
MemberRoles types.Array[consts.TenantUserRole] `json:"member_roles"`
|
||
// MemberStatus 当前用户在该租户下的成员状态。
|
||
MemberStatus consts.UserStatus `json:"member_status"`
|
||
// JoinedAt 加入租户时间(tenant_users.created_at)。
|
||
JoinedAt time.Time `json:"joined_at"`
|
||
}
|