Add Vivo Sync and tipo de chip fields

This commit is contained in:
Eduardo Lopes 2026-02-03 16:29:49 -03:00
parent 9b4271d2a5
commit 5c61fee989
4 changed files with 23 additions and 2 deletions

View File

@ -400,6 +400,7 @@ namespace line_gestao_api.Controllers
Skeelo = req.Skeelo,
VivoNewsPlus = req.VivoNewsPlus,
VivoTravelMundo = req.VivoTravelMundo,
VivoSync = req.VivoSync,
VivoGestaoDispositivo = req.VivoGestaoDispositivo,
ValorContratoVivo = req.ValorContratoVivo,
FranquiaLine = req.FranquiaLine,
@ -408,6 +409,7 @@ namespace line_gestao_api.Controllers
ValorContratoLine = req.ValorContratoLine,
Desconto = req.Desconto,
Lucro = req.Lucro,
TipoDeChip = req.TipoDeChip?.Trim(),
CreatedAt = now,
UpdatedAt = now
@ -460,6 +462,7 @@ namespace line_gestao_api.Controllers
x.Skeelo = req.Skeelo;
x.VivoNewsPlus = req.VivoNewsPlus;
x.VivoTravelMundo = req.VivoTravelMundo;
x.VivoSync = req.VivoSync;
x.VivoGestaoDispositivo = req.VivoGestaoDispositivo;
x.ValorContratoVivo = req.ValorContratoVivo;
x.FranquiaLine = req.FranquiaLine;
@ -477,6 +480,7 @@ namespace line_gestao_api.Controllers
x.DataEntregaOpera = ToUtc(req.DataEntregaOpera);
x.DataEntregaCliente = ToUtc(req.DataEntregaCliente);
x.VencConta = req.VencConta?.Trim();
x.TipoDeChip = req.TipoDeChip?.Trim();
ApplyReservaRule(x);
x.UpdatedAt = DateTime.UtcNow;
@ -576,6 +580,7 @@ namespace line_gestao_api.Controllers
Skeelo = TryDecimal(GetCellByHeaderAny(ws, r, map, "SKEELO")),
VivoNewsPlus = TryDecimal(GetCellByHeaderAny(ws, r, map, "VIVO NEWS PLUS")),
VivoTravelMundo = TryDecimal(GetCellByHeaderAny(ws, r, map, "VIVO TRAVEL MUNDO")),
VivoSync = TryDecimal(GetCellByHeaderAny(ws, r, map, "VIVO SYNC")),
VivoGestaoDispositivo = TryDecimal(GetCellByHeaderAny(ws, r, map, "VIVO GESTAO DISPOSITIVO")),
ValorContratoVivo = TryDecimal(GetCellByHeaderAny(ws, r, map, "VALOR CONTRATO VIVO", "VALOR DO CONTRATO VIVO")),
FranquiaLine = TryDecimal(GetCellByHeaderAny(ws, r, map, "FRANQUIA LINE", "FRAQUIA LINE")),
@ -593,6 +598,7 @@ namespace line_gestao_api.Controllers
DataEntregaOpera = TryDate(ws, r, map, "DATA DA ENTREGA OPERA."),
DataEntregaCliente = TryDate(ws, r, map, "DATA DA ENTREGA CLIENTE"),
VencConta = GetCellByHeader(ws, r, map, "VENC. DA CONTA"),
TipoDeChip = GetCellByHeaderAny(ws, r, map, "TIPO DE CHIP", "TIPO CHIP"),
CreatedAt = now,
UpdatedAt = now
};
@ -2438,6 +2444,7 @@ namespace line_gestao_api.Controllers
Skeelo = x.Skeelo,
VivoNewsPlus = x.VivoNewsPlus,
VivoTravelMundo = x.VivoTravelMundo,
VivoSync = x.VivoSync,
VivoGestaoDispositivo = x.VivoGestaoDispositivo,
ValorContratoVivo = x.ValorContratoVivo,
FranquiaLine = x.FranquiaLine,
@ -2454,7 +2461,8 @@ namespace line_gestao_api.Controllers
Solicitante = x.Solicitante,
DataEntregaOpera = x.DataEntregaOpera,
DataEntregaCliente = x.DataEntregaCliente,
VencConta = x.VencConta
VencConta = x.VencConta,
TipoDeChip = x.TipoDeChip
};
private static void ApplyReservaRule(MobileLine x)

View File

@ -49,6 +49,7 @@ namespace line_gestao_api.Dtos
public decimal? Skeelo { get; set; }
public decimal? VivoNewsPlus { get; set; }
public decimal? VivoTravelMundo { get; set; }
public decimal? VivoSync { get; set; }
public decimal? VivoGestaoDispositivo { get; set; }
public decimal? ValorContratoVivo { get; set; }
@ -65,5 +66,10 @@ namespace line_gestao_api.Dtos
// ==========================
public decimal? Desconto { get; set; }
public decimal? Lucro { get; set; }
// ==========================
// Identificação adicional
// ==========================
public string? TipoDeChip { get; set; }
}
}
}

View File

@ -33,6 +33,7 @@
public decimal? Skeelo { get; set; }
public decimal? VivoNewsPlus { get; set; }
public decimal? VivoTravelMundo { get; set; }
public decimal? VivoSync { get; set; }
public decimal? VivoGestaoDispositivo { get; set; }
public decimal? ValorContratoVivo { get; set; }
@ -53,6 +54,7 @@
public DateTime? DataEntregaOpera { get; set; }
public DateTime? DataEntregaCliente { get; set; }
public string? VencConta { get; set; }
public string? TipoDeChip { get; set; }
}
// ✅ UPDATE REQUEST (SEM Id)
@ -72,6 +74,7 @@
public decimal? Skeelo { get; set; }
public decimal? VivoNewsPlus { get; set; }
public decimal? VivoTravelMundo { get; set; }
public decimal? VivoSync { get; set; }
public decimal? VivoGestaoDispositivo { get; set; }
public decimal? ValorContratoVivo { get; set; }
@ -92,6 +95,7 @@
public DateTime? DataEntregaOpera { get; set; }
public DateTime? DataEntregaCliente { get; set; }
public string? VencConta { get; set; }
public string? TipoDeChip { get; set; }
}
public class ImportResultDto

View File

@ -29,6 +29,7 @@ namespace line_gestao_api.Models
public decimal? Skeelo { get; set; }
public decimal? VivoNewsPlus { get; set; }
public decimal? VivoTravelMundo { get; set; }
public decimal? VivoSync { get; set; }
public decimal? VivoGestaoDispositivo { get; set; }
public decimal? ValorContratoVivo { get; set; }
@ -59,6 +60,8 @@ namespace line_gestao_api.Models
[MaxLength(50)]
public string? VencConta { get; set; }
[MaxLength(80)]
public string? TipoDeChip { get; set; }
public DateTime CreatedAt { get; set; } = DateTime.UtcNow;
public DateTime UpdatedAt { get; set; } = DateTime.UtcNow;