62a5121ffe
Build backend images / build content-svc (push) Failing after 56s
Build backend images / build file-svc (push) Failing after 54s
Build backend images / build gateway (push) Failing after 1m1s
Build backend images / build identity-svc (push) Failing after 55s
Build backend images / build notification-svc (push) Failing after 54s
Build backend images / build render-svc (push) Failing after 52s
Build backend images / build studio-svc (push) Failing after 1m2s
Modeled on the legacy DivineGateWeb admin (CRM + Security/* actions):
- identity-svc AdminService + AdminController (admin-gated):
- GET /v1/admin/crm/analytics — signups/buyers/conversion/revenue + daily series
(from identity.users + identity.payments)
- GET/PUT /v1/users/{id}/crm — tags / note / pipeline status (user_crm table, mig 20)
- power-actions: POST /v1/users/{id}/{balance,password,charge,moderator,grant-plan}
- admin UI: /admin/crm dashboard (funnel cards + daily signup/revenue bars);
per-user "مدیریت" modal in Users (balance, render charge, plan days, password,
moderator, CRM notes)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
30 lines
1.3 KiB
C#
30 lines
1.3 KiB
C#
namespace FlatRender.IdentitySvc.Models;
|
|
|
|
// ── CRM analytics (acquisition / conversion funnel) ──────────────────────────
|
|
|
|
public record CrmDailyPoint(string Date, int Signups, int Buyers, long RevenueMinor);
|
|
|
|
public record CrmAnalyticsResponse(
|
|
int TotalSignups,
|
|
int Buyers,
|
|
int NonBuyers,
|
|
double ConversionRate,
|
|
long RevenueMinor,
|
|
int PayingUsersAllTime,
|
|
List<CrmDailyPoint> Daily
|
|
);
|
|
|
|
// ── CRM notes / tags per customer ────────────────────────────────────────────
|
|
|
|
public record UserCrmResponse(string[] Tags, string? Note, string Status);
|
|
|
|
public record UpsertUserCrmRequest(string[]? Tags, string? Note, string? Status);
|
|
|
|
// ── User admin power-actions ─────────────────────────────────────────────────
|
|
|
|
public record SetBalanceRequest(long AmountMinor, bool Add); // Add=false → set absolute
|
|
public record ResetPasswordRequest(string NewPassword);
|
|
public record AddChargeRequest(int Seconds, int RenderCount); // grant render seconds / daily renders
|
|
public record GrantPlanDaysRequest(Guid PlanId, int Days);
|
|
public record SetFlagRequest(bool Enabled);
|