From 1f4e14b2e973ee7de337fd4866d9a5ceff5cb6d1 Mon Sep 17 00:00:00 2001 From: Lucas Faria Mendes Date: Mon, 30 Mar 2026 10:38:18 -0300 Subject: chore: location --- .../Model.Domain.Seguros/CriticaApolice.cs | 116 +++++++++++++++++++++ 1 file changed, 116 insertions(+) create mode 100644 Codemerx/Gestor.Model/Model.Domain.Seguros/CriticaApolice.cs (limited to 'Codemerx/Gestor.Model/Model.Domain.Seguros/CriticaApolice.cs') diff --git a/Codemerx/Gestor.Model/Model.Domain.Seguros/CriticaApolice.cs b/Codemerx/Gestor.Model/Model.Domain.Seguros/CriticaApolice.cs new file mode 100644 index 0000000..efdfa8c --- /dev/null +++ b/Codemerx/Gestor.Model/Model.Domain.Seguros/CriticaApolice.cs @@ -0,0 +1,116 @@ +using Gestor.Model.Domain.Generic; +using Gestor.Model.Helper; +using Gestor.Model.Resources; +using Newtonsoft.Json; +using System; +using System.Collections.Generic; +using System.Runtime.CompilerServices; + +namespace Gestor.Model.Domain.Seguros +{ + public class CriticaApolice : DomainBase, IDomain + { + private string _naoEncontrados; + + private bool? _critica; + + public bool? Aggilizador + { + get; + set; + } + + public bool? Critica + { + get + { + return this._critica; + } + set + { + this._critica = new bool?(value.GetValueOrDefault()); + } + } + + public DateTime? DataCritica + { + get; + set; + } + + public DateTime? DataImportacao + { + get; + set; + } + + public Gestor.Model.Domain.Seguros.Documento Documento + { + get; + set; + } + + public string NaoEncontrados + { + get + { + string str = this._naoEncontrados; + if (str != null) + { + return str.ToUpper(); + } + return null; + } + set + { + this._naoEncontrados = value; + } + } + + public string Tipo + { + get; + set; + } + + public long? UsuarioCritica + { + get; + set; + } + + public Usuario UsuarioImportacao + { + get; + set; + } + + [JsonIgnore] + public Func>> ValidationEvent + { + get + { + CriticaApolice criticaApolouse = this; + return new Func>>(criticaApolouse.Validate); + } + } + + public CriticaApolice() + { + } + + public List> Validate() + { + List> keyValuePairs = ValidationHelper.AddValue(); + if (this.DataImportacao.HasValue && (DateTime.Compare(this.DataImportacao.Value, new DateTime(1753, 1, 1)) < 0 || DateTime.Compare(this.DataImportacao.Value, new DateTime(9999, 12, 31)) > 0)) + { + keyValuePairs.AddValue("DataImportacao", string.Format(Messages.DataInvalida, Array.Empty()), true); + } + if (this.DataCritica.HasValue && (DateTime.Compare(this.DataCritica.Value, new DateTime(1753, 1, 1)) < 0 || DateTime.Compare(this.DataCritica.Value, new DateTime(9999, 12, 31)) > 0)) + { + keyValuePairs.AddValue("DataCritica", string.Format(Messages.DataInvalida, Array.Empty()), true); + } + return keyValuePairs; + } + } +} \ No newline at end of file -- cgit v1.2.3