From 0440c722a221b8068bbf388c1c0c51f0faff0451 Mon Sep 17 00:00:00 2001 From: Lucas Faria Mendes Date: Mon, 30 Mar 2026 14:17:46 -0300 Subject: some dlls --- .../StatusDeProspeccao.cs | 74 ++++++++++++++++++++++ 1 file changed, 74 insertions(+) create mode 100644 Gestor.Model/Gestor.Model.Domain.Ferramentas/StatusDeProspeccao.cs (limited to 'Gestor.Model/Gestor.Model.Domain.Ferramentas/StatusDeProspeccao.cs') diff --git a/Gestor.Model/Gestor.Model.Domain.Ferramentas/StatusDeProspeccao.cs b/Gestor.Model/Gestor.Model.Domain.Ferramentas/StatusDeProspeccao.cs new file mode 100644 index 0000000..2e77bef --- /dev/null +++ b/Gestor.Model/Gestor.Model.Domain.Ferramentas/StatusDeProspeccao.cs @@ -0,0 +1,74 @@ +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.ComponentModel; +using Gestor.Model.Attributes; +using Gestor.Model.Domain.Generic; +using Gestor.Model.Domain.Seguros; +using Gestor.Model.Helper; +using Gestor.Model.Resources; +using Newtonsoft.Json; + +namespace Gestor.Model.Domain.Ferramentas; + +public class StatusDeProspeccao : DomainBase +{ + private string _nome; + + [Log(true)] + [Name(true)] + public string Nome + { + get + { + return _nome?.ToUpper(); + } + set + { + _nome = value; + } + } + + [Log(true)] + [Description("DESCRIÇÃO")] + public string Descricao { get; set; } + + [Log(true)] + public bool Ativo { get; set; } + + public bool Excluido { get; set; } + + [JsonIgnore] + public Func>> ValidationEvent => Validate; + + public List> Validate() + { + List> list = ValidationHelper.AddValue(); + if (string.IsNullOrWhiteSpace(Nome)) + { + list.AddValue("Nome", Messages.Obrigatorio); + } + else if (Nome.Length > 60) + { + list.AddValue("Nome", string.Format(Messages.MaiorQueLimite, 60)); + } + return list; + } + + public List Log() + { + return new List + { + new TupleList + { + Tuples = new ObservableCollection> + { + new Tuple("NOME", string.IsNullOrWhiteSpace(Nome) ? "" : Nome, ""), + new Tuple("DESCRIÇÃO", string.IsNullOrWhiteSpace(Descricao) ? "" : Descricao, ""), + new Tuple("ATIVO", Ativo ? "SIM" : "NÃO", ""), + new Tuple("EXCLUÍDO", Excluido ? "SIM" : "NÃO", "") + } + } + }; + } +} -- cgit v1.2.3