diff options
Diffstat (limited to 'Gestor.Model/Gestor.Model.Domain.Seguros/SinistroVida.cs')
| -rw-r--r-- | Gestor.Model/Gestor.Model.Domain.Seguros/SinistroVida.cs | 94 |
1 files changed, 94 insertions, 0 deletions
diff --git a/Gestor.Model/Gestor.Model.Domain.Seguros/SinistroVida.cs b/Gestor.Model/Gestor.Model.Domain.Seguros/SinistroVida.cs new file mode 100644 index 0000000..67070c9 --- /dev/null +++ b/Gestor.Model/Gestor.Model.Domain.Seguros/SinistroVida.cs @@ -0,0 +1,94 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using Gestor.Model.Attributes; +using Gestor.Model.Common; +using Gestor.Model.Domain.Generic; +using Gestor.Model.Helper; +using Newtonsoft.Json; + +namespace Gestor.Model.Domain.Seguros; + +public class SinistroVida : DomainBase, IDomain +{ + private string _certObito; + + private string _beneficiario; + + private string _observacao; + + public Sinistro Sinistro { get; set; } + + [Log(true)] + [Name(true)] + [Description("TIPO PERDA")] + public TipoPerda? TipoPerda { get; set; } + + [Log(true)] + [Name(true)] + [Description("AUXÍLIO FUNERAL")] + public bool? AuxFuneral { get; set; } + + [Log(true)] + [Name(true)] + [Description("ESTADO CÍVIL")] + public EstadoCivil? EstadoCivil { get; set; } + + [Log(true)] + [Name(true)] + [Description("CERT. ÓBITO")] + public string CertObito + { + get + { + return _certObito?.ToUpper(); + } + set + { + _certObito = value; + } + } + + [Log(true)] + [Name(true)] + [Description("BENEFICIÁRIO")] + public string Beneficiario + { + get + { + return _beneficiario?.ToUpper(); + } + set + { + _beneficiario = value; + } + } + + [Log(true)] + [Name(true)] + [Description("OBSERVAÇÃO")] + public string Observacao + { + get + { + return _observacao?.ToUpper(); + } + set + { + _observacao = value; + } + } + + [JsonIgnore] + public Func<List<KeyValuePair<string, string>>> ValidationEvent => Validate; + + public List<KeyValuePair<string, string>> Validate() + { + List<KeyValuePair<string, string>> list = ValidationHelper.AddValue(); + if (Sinistro != null) + { + list.AddRange(Sinistro.Validate()); + } + return list; + } +} |