Files
quyun-v2/backend/app/http/web/dto/me.go
Rogee 87f569cc6a feat: add tenant admin invite management, ledger overview, order details, and order management features
- 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.
2025-12-24 19:41:44 +08:00

52 lines
2.0 KiB
Go
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
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 是否为租户Ownertenants.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"`
}