rwadurian/backend/services/referral-service/src/application/queries/get-direct-referrals.query.ts

23 lines
591 B
TypeScript
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.

export class GetDirectReferralsQuery {
constructor(
public readonly userId: bigint,
public readonly limit: number = 50,
public readonly offset: number = 0,
) {}
}
export interface DirectReferralResult {
userId: string;
accountSequence: number; // 8位账户序列号显示用
referralCode: string;
personalPlantingCount: number; // 个人认种量
teamPlantingCount: number; // 团队认种量
joinedAt: Date;
}
export interface DirectReferralsResult {
referrals: DirectReferralResult[];
total: number;
hasMore: boolean;
}