feat(M08-D): 补团购与第三方平台运营

This commit is contained in:
Codex
2026-08-10 12:10:15 +08:00
parent e8bd176914
commit 7b978089d5
9 changed files with 493 additions and 50 deletions
+62
View File
@@ -206,6 +206,68 @@ export interface ProfitSharingSnapshot {
shares: ProfitShareRecord[];
}
export type ThirdPartyProvider = 'MEITUAN' | 'DIANPING' | 'DOUYIN' | 'KUAISHOU';
export type ThirdPartyMode = 'MANUAL' | 'MOCK' | 'API';
export interface DirectBookingRecord {
id: string;
provider: ThirdPartyProvider;
externalBookingNo: string;
storeId: string | null;
roomId: string | null;
startsAt: string;
endsAt: string;
amountCents: number;
status: string;
orderId: string | null;
failureCode: string;
createdAt: string;
}
export interface GroupRedemptionRecord {
id: string;
provider: ThirdPartyProvider;
voucherMasked: string;
orderId: string;
storeId: string;
mode: ThirdPartyMode;
actorId: string | null;
status: string;
failureCode: string;
createdAt: string;
completedAt: string | null;
}
export interface ThirdPartyRecords {
bookings: DirectBookingRecord[];
redemptions: GroupRedemptionRecord[];
}
export interface ThirdPartyConfigSummary {
id: string;
provider: ThirdPartyProvider;
storeId: string | null;
mode: ThirdPartyMode;
enabled: boolean;
credentialRef: string;
credentialConfigured: boolean;
settings: Record<string, unknown>;
updatedAt: string;
}
export interface ThirdPartyMappingSummary {
id: string;
provider: ThirdPartyProvider;
resourceType: 'STORE' | 'ROOM';
externalRef: string;
localResourceId: string;
}
export interface ThirdPartySetup {
configs: ThirdPartyConfigSummary[];
mappings: ThirdPartyMappingSummary[];
}
export interface BusinessStatistics {
storeId: string;
from: string;