feat(promo): promo metric event logs and HQ timeline charts (v3.4.13)
Add log_promo_event for scan/attribution/register/order with IP; admin metrics APIs and ECharts on promo detail page. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -87,3 +87,37 @@ export class UpdatePromoCodeStatusDto {
|
||||
@IsIn(['ACTIVE', 'DISABLED'])
|
||||
status: PromoCodeStatus;
|
||||
}
|
||||
|
||||
export class PromoMetricTimelineQueryDto {
|
||||
@IsString()
|
||||
dateFrom: string;
|
||||
|
||||
@IsString()
|
||||
dateTo: string;
|
||||
|
||||
@IsOptional()
|
||||
@IsIn(['day', 'hour'])
|
||||
granularity?: 'day' | 'hour';
|
||||
}
|
||||
|
||||
export class PromoMetricEventsQueryDto {
|
||||
@IsOptional()
|
||||
@Type(() => Number)
|
||||
page?: number;
|
||||
|
||||
@IsOptional()
|
||||
@Type(() => Number)
|
||||
pageSize?: number;
|
||||
|
||||
@IsOptional()
|
||||
@IsIn(['SCAN', 'ATTRIBUTION', 'REGISTER', 'ORDER'])
|
||||
eventType?: 'SCAN' | 'ATTRIBUTION' | 'REGISTER' | 'ORDER';
|
||||
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
dateFrom?: string;
|
||||
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
dateTo?: string;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user