feat: 支持课后评价与成长档案
完成后即可评价并订阅提醒,馆主可记录体测、笔记与成长照片,首页展示匿名星级均分。 Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -68,6 +68,7 @@ export enum InviteReferralStatus {
|
||||
|
||||
// ===== Subscribe Message =====
|
||||
export enum SubscriptionMessageScene {
|
||||
CLASS_REVIEW = 'CLASS_REVIEW',
|
||||
ORDER_PAID = 'ORDER_PAID',
|
||||
BOOKING_CREATED = 'BOOKING_CREATED',
|
||||
ADMIN_BOOKING_CREATED = 'ADMIN_BOOKING_CREATED',
|
||||
|
||||
@@ -123,3 +123,5 @@ export type {
|
||||
} from './types/index'
|
||||
|
||||
export { FlashSalePhase } from './types/index'
|
||||
|
||||
export * from './types/member-care'
|
||||
|
||||
@@ -15,6 +15,7 @@ export interface Booking {
|
||||
}
|
||||
|
||||
export interface BookingWithDetails extends Booking {
|
||||
readonly review?: { rating: number } | null
|
||||
readonly timeSlot: {
|
||||
readonly date: string
|
||||
readonly startTime: string
|
||||
|
||||
23
packages/shared/src/types/member-care.ts
Normal file
23
packages/shared/src/types/member-care.ts
Normal file
@@ -0,0 +1,23 @@
|
||||
export const REVIEW_TAGS = ['动作到位', '氛围好', '强度合适', '讲解清晰', '耐心细致', '收获满满'] as const
|
||||
export interface ClassReview {
|
||||
id: string; bookingId: string; rating: number; recommendation: number | null; tags: string[]; comment: string; createdAt: string
|
||||
}
|
||||
export interface ReviewEntry extends ClassReview {
|
||||
booking: { userId: string; user: { nickname: string }; timeSlot: { date: string; startTime: string; endTime: string } }
|
||||
}
|
||||
export interface ReviewSummary {
|
||||
month: string; count: number; average: number | null; nps: number | null; npsCount: number
|
||||
}
|
||||
export interface BodyMetricRecord {
|
||||
id: string; recordedAt: string; weight: number | null; bodyFat: number | null; waist: number | null; hip: number | null; flexibility: number | null; remark: string
|
||||
}
|
||||
export interface MemberNoteRecord {
|
||||
id: string; content: string; shared: boolean; createdAt: string; bookingId: string | null
|
||||
booking: { timeSlot: { date: string; startTime: string } } | null
|
||||
}
|
||||
export interface ProgressPhotoRecord {
|
||||
id: string; caption: string; recordedAt: string; consentedAt: string | null; revokedAt: string | null
|
||||
}
|
||||
export interface ProgressArchive {
|
||||
nickname: string; completedCount: number; milestones: number[]; metrics: BodyMetricRecord[]; notes: MemberNoteRecord[]; photos: ProgressPhotoRecord[]
|
||||
}
|
||||
Reference in New Issue
Block a user