feat: enhance zap functionality with stats tracking and pubkey support
- Added a new endpoint in ZapsController to retrieve zap statistics by project IDs, including total counts, amounts, and recent zapper pubkeys. - Updated ZapsService to record zap statistics, including optional zapper pubkey for tracking who zapped. - Enhanced CreateZapInvoiceDto to include an optional zapperPubkey field. - Modified frontend components to display zap stats and integrate with the new backend functionality, improving user engagement and transparency. These changes improve the overall zap experience by providing detailed insights into zap activities and enhancing the tracking of contributors.
This commit is contained in:
16
backend/src/zaps/entities/zap-stats.entity.ts
Normal file
16
backend/src/zaps/entities/zap-stats.entity.ts
Normal file
@@ -0,0 +1,16 @@
|
||||
import { Column, Entity, PrimaryColumn } from 'typeorm';
|
||||
|
||||
@Entity('zap_stats')
|
||||
export class ZapStats {
|
||||
@PrimaryColumn()
|
||||
projectId: string;
|
||||
|
||||
@Column('int', { default: 0 })
|
||||
zapCount: number;
|
||||
|
||||
@Column('int', { default: 0 })
|
||||
zapAmountSats: number;
|
||||
|
||||
@Column({ type: 'jsonb', default: [] })
|
||||
recentZapperPubkeys: string[];
|
||||
}
|
||||
Reference in New Issue
Block a user