Fix vari
This commit is contained in:
@@ -6,11 +6,36 @@ namespace salesbook.Shared.Core.Entity;
|
||||
[Table("ptb_pros_rif")]
|
||||
public class PtbProsRif
|
||||
{
|
||||
[PrimaryKey, Column("composite_key")]
|
||||
public string CompositeKey { get; set; }
|
||||
|
||||
private string? _codPpro;
|
||||
|
||||
[Column("cod_ppro"), JsonPropertyName("codPpro"), Indexed(Name = "PtbProsRifPK", Order = 1, Unique = true)]
|
||||
public string CodPpro { get; set; }
|
||||
public string? CodPpro
|
||||
{
|
||||
get => _codPpro;
|
||||
set
|
||||
{
|
||||
_codPpro = value;
|
||||
if (_codPpro != null && _idPersRif != null)
|
||||
UpdateCompositeKey();
|
||||
}
|
||||
}
|
||||
|
||||
private int? _idPersRif;
|
||||
|
||||
[Column("id_pers_rif"), JsonPropertyName("idPersRif"), Indexed(Name = "PtbProsRifPK", Order = 2, Unique = true)]
|
||||
public int IdPersRif { get; set; }
|
||||
public int? IdPersRif
|
||||
{
|
||||
get => _idPersRif;
|
||||
set
|
||||
{
|
||||
_idPersRif = value;
|
||||
if (_codPpro != null && _idPersRif != null)
|
||||
UpdateCompositeKey();
|
||||
}
|
||||
}
|
||||
|
||||
[Column("persona_rif"), JsonPropertyName("personaRif")]
|
||||
public string PersonaRif { get; set; }
|
||||
@@ -29,4 +54,7 @@ public class PtbProsRif
|
||||
|
||||
[Column("telefono"), JsonPropertyName("telefono")]
|
||||
public string Telefono { get; set; }
|
||||
|
||||
private void UpdateCompositeKey() =>
|
||||
CompositeKey = $"{CodPpro}::{IdPersRif}";
|
||||
}
|
||||
@@ -7,7 +7,7 @@ namespace salesbook.Shared.Core.Entity;
|
||||
public class StbActivity
|
||||
{
|
||||
[PrimaryKey, Column("activity_id"), JsonPropertyName("activityId")]
|
||||
public string ActivityId { get; set; }
|
||||
public string? ActivityId { get; set; }
|
||||
|
||||
[Column("activity_result_id"), JsonPropertyName("activityResultId")]
|
||||
public string? ActivityResultId { get; set; }
|
||||
|
||||
@@ -6,11 +6,36 @@ namespace salesbook.Shared.Core.Entity;
|
||||
[Table("stb_activity_type")]
|
||||
public class StbActivityType
|
||||
{
|
||||
[PrimaryKey, Column("composite_key")]
|
||||
public string CompositeKey { get; set; }
|
||||
|
||||
private string? _activityTypeId;
|
||||
|
||||
[Column("activity_type_id"), JsonPropertyName("activityTypeId"), Indexed(Name = "ActivityTypePK", Order = 1, Unique = true)]
|
||||
public string ActivityTypeId { get; set; }
|
||||
public string? ActivityTypeId
|
||||
{
|
||||
get => _activityTypeId;
|
||||
set
|
||||
{
|
||||
_activityTypeId = value;
|
||||
if (_activityTypeId != null && _flagTipologia != null)
|
||||
UpdateCompositeKey();
|
||||
}
|
||||
}
|
||||
|
||||
private string? _flagTipologia;
|
||||
|
||||
[Column("flag_tipologia"), JsonPropertyName("flagTipologia"), Indexed(Name = "ActivityTypePK", Order = 2, Unique = true)]
|
||||
public string FlagTipologia { get; set; }
|
||||
public string? FlagTipologia
|
||||
{
|
||||
get => _flagTipologia;
|
||||
set
|
||||
{
|
||||
_flagTipologia = value;
|
||||
if (_activityTypeId != null && _flagTipologia != null)
|
||||
UpdateCompositeKey();
|
||||
}
|
||||
}
|
||||
|
||||
[Column("estimated_duration"), JsonPropertyName("estimatedDuration")]
|
||||
public double? EstimatedDuration { get; set; } = 0;
|
||||
@@ -38,4 +63,7 @@ public class StbActivityType
|
||||
|
||||
[Column("flag_view_calendar"), JsonPropertyName("flagViewCalendar")]
|
||||
public bool FlagViewCalendar { get; set; }
|
||||
|
||||
private void UpdateCompositeKey() =>
|
||||
CompositeKey = $"{ActivityTypeId}::{FlagTipologia}";
|
||||
}
|
||||
@@ -6,11 +6,36 @@ namespace salesbook.Shared.Core.Entity;
|
||||
[Table("vtb_clie_pers_rif")]
|
||||
public class VtbCliePersRif
|
||||
{
|
||||
[PrimaryKey, Column("composite_key")]
|
||||
public string CompositeKey { get; set; }
|
||||
|
||||
private int? _idPersRif;
|
||||
|
||||
[Column("id_pers_rif"), JsonPropertyName("idPersRif"), Indexed(Name = "VtbCliePersRifPK", Order = 1, Unique = true)]
|
||||
public int IdPersRif { get; set; }
|
||||
public int? IdPersRif
|
||||
{
|
||||
get => _idPersRif;
|
||||
set
|
||||
{
|
||||
_idPersRif = value;
|
||||
if (_idPersRif != null && _codAnag != null)
|
||||
UpdateCompositeKey();
|
||||
}
|
||||
}
|
||||
|
||||
private string? _codAnag;
|
||||
|
||||
[Column("cod_anag"), JsonPropertyName("codAnag"), Indexed(Name = "VtbCliePersRifPK", Order = 2, Unique = true)]
|
||||
public string CodAnag { get; set; }
|
||||
public string? CodAnag
|
||||
{
|
||||
get => _codAnag;
|
||||
set
|
||||
{
|
||||
_codAnag = value;
|
||||
if (_idPersRif != null && _codAnag != null)
|
||||
UpdateCompositeKey();
|
||||
}
|
||||
}
|
||||
|
||||
[Column("persona_rif"), JsonPropertyName("personaRif")]
|
||||
public string PersonaRif { get; set; }
|
||||
@@ -38,4 +63,7 @@ public class VtbCliePersRif
|
||||
|
||||
[Column("data_ult_agg"), JsonPropertyName("dataUltAgg")]
|
||||
public DateTime? DataUltAgg { get; set; } = DateTime.Now;
|
||||
|
||||
private void UpdateCompositeKey() =>
|
||||
CompositeKey = $"{IdPersRif}::{CodAnag}";
|
||||
}
|
||||
@@ -6,11 +6,36 @@ namespace salesbook.Shared.Core.Entity;
|
||||
[Table("vtb_dest")]
|
||||
public class VtbDest
|
||||
{
|
||||
[PrimaryKey, Column("composite_key")]
|
||||
public string CompositeKey { get; set; }
|
||||
|
||||
private string? _codAnag;
|
||||
|
||||
[Column("cod_anag"), JsonPropertyName("codAnag"), Indexed(Name = "VtbDestPK", Order = 1, Unique = true)]
|
||||
public string CodAnag { get; set; }
|
||||
public string? CodAnag
|
||||
{
|
||||
get => _codAnag;
|
||||
set
|
||||
{
|
||||
_codAnag = value;
|
||||
if (_codAnag != null && _codVdes != null)
|
||||
UpdateCompositeKey();
|
||||
}
|
||||
}
|
||||
|
||||
private string? _codVdes;
|
||||
|
||||
[Column("cod_vdes"), JsonPropertyName("codVdes"), Indexed(Name = "VtbDestPK", Order = 2, Unique = true)]
|
||||
public string CodVdes { get; set; }
|
||||
public string? CodVdes
|
||||
{
|
||||
get => _codVdes;
|
||||
set
|
||||
{
|
||||
_codVdes = value;
|
||||
if (_codAnag != null && _codVdes != null)
|
||||
UpdateCompositeKey();
|
||||
}
|
||||
}
|
||||
|
||||
[Column("destinatario"), JsonPropertyName("destinatario")]
|
||||
public string Destinatario { get; set; }
|
||||
@@ -194,4 +219,7 @@ public class VtbDest
|
||||
|
||||
[Column("cod_fisc_legale"), JsonPropertyName("codFiscLegale")]
|
||||
public string CodFiscLegale { get; set; }
|
||||
|
||||
private void UpdateCompositeKey() =>
|
||||
CompositeKey = $"{CodAnag}::{CodVdes}";
|
||||
}
|
||||
Reference in New Issue
Block a user