QrRapido/Models/ViewModels/QRGenerationRequest.cs
Ricardo Carneiro 7a0c12f8d2
Some checks failed
Deploy QR Rapido / test (push) Failing after 17s
Deploy QR Rapido / build-and-push (push) Has been skipped
Deploy QR Rapido / deploy-staging (push) Has been skipped
Deploy QR Rapido / deploy-production (push) Has been skipped
feat: api separada do front-end e area do desenvolvedor.
2026-03-08 12:40:51 -03:00

61 lines
2.6 KiB
C#

using QRRapidoApp.Models;
namespace QRRapidoApp.Models.ViewModels
{
public class QRGenerationRequest
{
public string Type { get; set; } = string.Empty;
public string Content { get; set; } = string.Empty;
public string QuickStyle { get; set; } = "classic";
public string PrimaryColor { get; set; } = "#000000";
public string BackgroundColor { get; set; } = "#FFFFFF";
public int Size { get; set; } = 300;
public int Margin { get; set; } = 2;
public string CornerStyle { get; set; } = "square";
public bool OptimizeForSpeed { get; set; } = true;
public string Language { get; set; } = "pt-BR";
public bool IsPremium { get; set; } = false;
public bool HasLogo { get; set; } = false;
public byte[]? Logo { get; set; }
// NOVAS PROPRIEDADES PARA LOGO APRIMORADO
/// <summary>
/// Tamanho do logo em porcentagem (10-25%). Padrão: 20%
/// </summary>
public int? LogoSizePercent { get; set; } = 20;
/// <summary>
/// Se deve aplicar a cor do QR code no logo (Premium feature)
/// </summary>
public bool ApplyLogoColorization { get; set; } = false;
/// <summary>
/// Se deve habilitar analytics de leitura (Premium feature)
/// Quando habilitado, o QR code usa URL de redirect para contabilizar leituras
/// </summary>
public bool EnableTracking { get; set; } = false;
/// <summary>
/// Output image format: "png" (default), "webp", "svg"
/// WebP is recommended for API consumers — smaller file size, same visual quality.
/// </summary>
public string OutputFormat { get; set; } = "png";
}
public class QRGenerationResult
{
public string QRCodeBase64 { get; set; } = string.Empty;
public string QRId { get; set; } = string.Empty;
public long GenerationTimeMs { get; set; }
public bool FromCache { get; set; }
public int Size { get; set; }
public QRGenerationRequest? RequestSettings { get; set; }
public int? RemainingQRs { get; set; } // For free users
public bool Success { get; set; } = true;
public string? ErrorMessage { get; set; }
public string? Message { get; set; } // Feedback message (e.g. "Recovered from history")
public LogoReadabilityInfo? ReadabilityInfo { get; set; } // Nova propriedade para análise de legibilidade
public string? TrackingId { get; set; } // Tracking ID for analytics (Premium feature)
public string OutputFormat { get; set; } = "png"; // "png", "webp"
}
}