2026-06-02 18:59:07 +03:30
|
|
|
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
|
|
|
|
|
);
|
|
|
|
|
|
2026-06-03 00:08:21 +03:30
|
|
|
// ── OAuth provider config ─────────────────────────────────────────────────────
|
|
|
|
|
|
|
|
|
|
public record OAuthConfigResponse(string Provider, string? ClientId, string? RedirectUri, bool Enabled, bool HasSecret);
|
|
|
|
|
|
|
|
|
|
public record UpsertOAuthConfigRequest(string? ClientId, string? ClientSecret, string? RedirectUri, bool Enabled);
|
|
|
|
|
|
2026-06-02 23:02:03 +03:30
|
|
|
// ── Plan statistics breakdown ────────────────────────────────────────────────
|
|
|
|
|
|
|
|
|
|
public record PlanStatRow(string PlanName, int Total, int Active, long RevenueMinor);
|
|
|
|
|
|
2026-06-02 18:59:07 +03:30
|
|
|
// ── 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);
|
2026-06-05 16:48:05 +03:30
|
|
|
public record SetRenderSlotsRequest(int Ceiling); // concurrent-render ceiling
|