diff options
Diffstat (limited to 'Gestor.Model/Gestor.Model.Domain.Financeiro/Plano.cs')
| -rw-r--r-- | Gestor.Model/Gestor.Model.Domain.Financeiro/Plano.cs | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/Gestor.Model/Gestor.Model.Domain.Financeiro/Plano.cs b/Gestor.Model/Gestor.Model.Domain.Financeiro/Plano.cs new file mode 100644 index 0000000..7a3ed22 --- /dev/null +++ b/Gestor.Model/Gestor.Model.Domain.Financeiro/Plano.cs @@ -0,0 +1,42 @@ +using System; +using System.Collections.Generic; +using Gestor.Model.Domain.Generic; +using Gestor.Model.Helper; +using Gestor.Model.Resources; +using Newtonsoft.Json; + +namespace Gestor.Model.Domain.Financeiro; + +public class Plano : DomainBase, IDomain +{ + private string _descricao; + + public bool Selecionado { get; set; } + + public string Descricao + { + get + { + return _descricao?.ToUpper(); + } + set + { + _descricao = value; + } + } + + public bool Ativo { get; set; } + + [JsonIgnore] + public Func<List<KeyValuePair<string, string>>> ValidationEvent => Validate; + + public List<KeyValuePair<string, string>> Validate() + { + List<KeyValuePair<string, string>> list = ValidationHelper.AddValue(); + if (string.IsNullOrWhiteSpace(Descricao)) + { + list.AddValue("Descricao", Messages.Obrigatorio); + } + return list; + } +} |