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.Generic/EnderecoBase.cs | 128 +++++++++++++++++++++ 1 file changed, 128 insertions(+) create mode 100644 Codemerx/Gestor.Model/Model.Domain.Generic/EnderecoBase.cs (limited to 'Codemerx/Gestor.Model/Model.Domain.Generic/EnderecoBase.cs') diff --git a/Codemerx/Gestor.Model/Model.Domain.Generic/EnderecoBase.cs b/Codemerx/Gestor.Model/Model.Domain.Generic/EnderecoBase.cs new file mode 100644 index 0000000..964fb70 --- /dev/null +++ b/Codemerx/Gestor.Model/Model.Domain.Generic/EnderecoBase.cs @@ -0,0 +1,128 @@ +using Gestor.Model.Attributes; +using System; +using System.ComponentModel; +using System.Runtime.CompilerServices; +using System.Text.RegularExpressions; + +namespace Gestor.Model.Domain.Generic +{ + public class EnderecoBase : DomainBase + { + private string _cep; + + private string _endereco; + + private string _numero; + + private string _bairro; + + private string _cidade; + + private string _estado; + + [Log(true)] + public string Bairro + { + get + { + return this._bairro; + } + set + { + this._bairro = value; + } + } + + [Log(true)] + public string Cep + { + get + { + if (this._cep == null || !Regex.IsMatch(this._cep, "[0-9]+")) + { + return ""; + } + return this._cep.Trim(); + } + set + { + this._cep = value; + } + } + + [Log(true)] + public string Cidade + { + get + { + return this._cidade; + } + set + { + this._cidade = value; + } + } + + [Log(true)] + public string Complemento + { + get; + set; + } + + [Description("ENDEREÇO")] + [Log(true)] + public string Endereco + { + get + { + return this._endereco; + } + set + { + this._endereco = value; + } + } + + [Log(true)] + public string Estado + { + get + { + string str = this._estado; + if (str == null) + { + return null; + } + return str.ToUpper().Trim(); + } + set + { + this._estado = value; + } + } + + [Description("NÚMERO")] + [Log(true)] + public string Numero + { + get + { + string str = this._numero; + if (str != null) + { + return str.ToUpper(); + } + return null; + } + set + { + this._numero = value; + } + } + + public EnderecoBase() + { + } + } +} \ No newline at end of file -- cgit v1.2.3