perf: 优化订阅刷新逻辑

This commit is contained in:
richarjiang
2026-09-07 14:06:19 +08:00
parent 88cd8419c8
commit f5c7b7eaac
27 changed files with 3248 additions and 1060 deletions

View File

@@ -57,6 +57,12 @@ export type {
UserProfileResponse,
UpdateProfileDto,
UserStatsResponse,
AdminMemberActiveCardSummary,
AdminMemberSummary,
AdminMemberUpcomingBooking,
AdminMemberBookingStats,
AdminMemberDetail,
UpdateAdminMemberProfileDto,
CardType,
CreateCardTypeDto,
UpdateCardTypeDto,
@@ -77,6 +83,7 @@ export type {
TeachingScheduleSlot,
BookingStatusHistory,
CreateBookingDto,
AdminArrangeBookingDto,
Order,
OrderWithDetails,
CreateOrderDto,

View File

@@ -69,3 +69,13 @@ export interface CreateBookingDto {
readonly timeSlotId: string
readonly membershipId: string
}
export interface AdminArrangeBookingDto {
readonly userId: string
readonly membershipId: string
readonly timeSlotId?: string
readonly date?: string
readonly startTime?: string
readonly endTime?: string
readonly capacity?: number
}

View File

@@ -1,4 +1,15 @@
export type { User, UserProfileResponse, UpdateProfileDto, UserStatsResponse } from './user'
export type {
User,
UserProfileResponse,
UpdateProfileDto,
UserStatsResponse,
AdminMemberActiveCardSummary,
AdminMemberSummary,
AdminMemberUpcomingBooking,
AdminMemberBookingStats,
AdminMemberDetail,
UpdateAdminMemberProfileDto,
} from './user'
export type {
SubscriptionMessageRequestResult,
SubscriptionMessageRequestItem,
@@ -19,6 +30,7 @@ export type {
TeachingScheduleSlot,
BookingStatusHistory,
CreateBookingDto,
AdminArrangeBookingDto,
} from './booking'
export type { Order, OrderWithDetails, CreateOrderDto, PaymentParams, CreateOrderResponse } from './order'
export type {

View File

@@ -1,4 +1,5 @@
import { UserRole } from '../enums'
import { BookingStatus, CardTypeCategory, UserRole } from '../enums'
import type { MembershipWithCardType } from './membership'
import type { SubscriptionMessageTemplateConfig } from './subscription'
export interface User {
@@ -9,6 +10,7 @@ export interface User {
readonly nickname: string
readonly avatarUrl: string | null
readonly role: UserRole
readonly lastLoginAt: string | null
readonly createdAt: string
readonly updatedAt: string
}
@@ -38,3 +40,58 @@ export interface UserStatsResponse {
readonly monthDays: number
readonly monthHours: number
}
export interface AdminMemberActiveCardSummary {
readonly name: string
readonly type: CardTypeCategory
}
export interface AdminMemberSummary {
readonly userId: string
readonly openid: string
readonly nickname: string
readonly phone: string | null
readonly avatarUrl: string | null
readonly createdAt: string
readonly lastLoginAt: string | null
readonly activeCard: AdminMemberActiveCardSummary | null
readonly totalBookings: number
readonly completedBookings: number
readonly cancelledBookings: number
}
export interface AdminMemberUpcomingBooking {
readonly id: string
readonly status: BookingStatus
readonly date: string
readonly startTime: string
readonly endTime: string
readonly cardName: string
}
export interface AdminMemberBookingStats {
readonly totalBookings: number
readonly completedBookings: number
readonly cancelledBookings: number
readonly noShowBookings: number
}
export interface AdminMemberDetail {
readonly user: {
readonly userId: string
readonly openid: string
readonly nickname: string
readonly phone: string | null
readonly avatarUrl: string | null
readonly createdAt: string
readonly lastLoginAt: string | null
}
readonly memberships: readonly MembershipWithCardType[]
readonly stats: AdminMemberBookingStats
readonly upcomingBookings: readonly AdminMemberUpcomingBooking[]
}
export interface UpdateAdminMemberProfileDto {
readonly nickname?: string
readonly phone?: string | null
}