73 lines
1.7 KiB
TypeScript
73 lines
1.7 KiB
TypeScript
/**
|
|
* 贡献值分配完成事件
|
|
* 来自 contribution-service
|
|
*/
|
|
export interface ContributionDistributionCompletedEvent {
|
|
eventType: 'ContributionDistributionCompleted';
|
|
eventId: string;
|
|
timestamp: string;
|
|
payload: ContributionDistributionPayload;
|
|
}
|
|
|
|
export interface ContributionDistributionPayload {
|
|
// 认种信息
|
|
adoptionId: string;
|
|
adopterAccountSequence: string;
|
|
treeCount: number;
|
|
adoptionDate: string;
|
|
|
|
// 用户贡献值分配
|
|
userContributions: UserContributionItem[];
|
|
|
|
// 系统账户分配
|
|
systemContributions: SystemContributionItem[];
|
|
|
|
// 未分配(归总部)
|
|
unallocatedToHeadquarters: UnallocatedContributionItem[];
|
|
}
|
|
|
|
export interface UserContributionItem {
|
|
accountSequence: string;
|
|
contributionType: 'PERSONAL' | 'TEAM_LEVEL' | 'TEAM_BONUS';
|
|
amount: string;
|
|
levelDepth?: number; // 1-15 for TEAM_LEVEL
|
|
bonusTier?: number; // 1-3 for TEAM_BONUS
|
|
effectiveDate: string;
|
|
expireDate: string;
|
|
sourceAdoptionId: string;
|
|
sourceAccountSequence: string;
|
|
}
|
|
|
|
export interface SystemContributionItem {
|
|
accountType: 'OPERATION' | 'PROVINCE' | 'CITY' | 'HEADQUARTERS';
|
|
amount: string;
|
|
provinceCode?: string;
|
|
cityCode?: string;
|
|
neverExpires: boolean;
|
|
}
|
|
|
|
export interface UnallocatedContributionItem {
|
|
reason: string;
|
|
amount: string;
|
|
wouldBeAccountSequence?: string;
|
|
levelDepth?: number;
|
|
bonusTier?: number;
|
|
}
|
|
|
|
/**
|
|
* 用户注册事件
|
|
* 来自 auth-service
|
|
*/
|
|
export interface UserRegisteredEvent {
|
|
eventType: 'UserRegistered';
|
|
eventId: string;
|
|
timestamp: string;
|
|
payload: {
|
|
accountSequence: string;
|
|
phone: string;
|
|
referrerAccountSequence: string | null;
|
|
registeredAt: string;
|
|
source: 'LEGACY_MIGRATION' | 'NEW_REGISTRATION';
|
|
};
|
|
}
|