summaryrefslogtreecommitdiff
path: root/Gestor.Model/Model.Domain.Common
diff options
context:
space:
mode:
Diffstat (limited to 'Gestor.Model/Model.Domain.Common')
-rw-r--r--Gestor.Model/Model.Domain.Common/ArquivoDigital.cs213
-rw-r--r--Gestor.Model/Model.Domain.Common/Atividade.cs50
-rw-r--r--Gestor.Model/Model.Domain.Common/Banco.cs87
-rw-r--r--Gestor.Model/Model.Domain.Common/Contato.cs31
-rw-r--r--Gestor.Model/Model.Domain.Common/ControleArquivoDigital.cs25
-rw-r--r--Gestor.Model/Model.Domain.Common/Empresa.cs546
-rw-r--r--Gestor.Model/Model.Domain.Common/Fipe.cs138
-rw-r--r--Gestor.Model/Model.Domain.Common/FipeDetalhe.cs24
-rw-r--r--Gestor.Model/Model.Domain.Common/IndiceArquivoDigital.cs246
-rw-r--r--Gestor.Model/Model.Domain.Common/PesquisaAvancada.cs55
-rw-r--r--Gestor.Model/Model.Domain.Common/Profissao.cs69
-rw-r--r--Gestor.Model/Model.Domain.Common/RegistroAcao.cs81
-rw-r--r--Gestor.Model/Model.Domain.Common/RegistroLog.cs81
-rw-r--r--Gestor.Model/Model.Domain.Common/Socio.cs159
-rw-r--r--Gestor.Model/Model.Domain.Common/TrocaCliente.cs117
15 files changed, 1922 insertions, 0 deletions
diff --git a/Gestor.Model/Model.Domain.Common/ArquivoDigital.cs b/Gestor.Model/Model.Domain.Common/ArquivoDigital.cs
new file mode 100644
index 0000000..d0fb6a1
--- /dev/null
+++ b/Gestor.Model/Model.Domain.Common/ArquivoDigital.cs
@@ -0,0 +1,213 @@
+using Gestor.Model.Domain.Generic;
+using System;
+using System.Runtime.CompilerServices;
+
+namespace Gestor.Model.Domain.Common
+{
+ public class ArquivoDigital : DomainBase
+ {
+ private string _descricao;
+
+ private string _extensao;
+
+ public byte[] Arquivo
+ {
+ get;
+ set;
+ }
+
+ public Guid? AzureGuid
+ {
+ get;
+ set;
+ }
+
+ public string AzureStorage
+ {
+ get;
+ set;
+ }
+
+ public DateTime? DataAtualizacao
+ {
+ get;
+ set;
+ }
+
+ public DateTime? DataCriacao
+ {
+ get;
+ set;
+ }
+
+ public string Descricao
+ {
+ get
+ {
+ string str = this._descricao;
+ if (str != null)
+ {
+ return str.ToUpper();
+ }
+ return null;
+ }
+ set
+ {
+ this._descricao = value;
+ }
+ }
+
+ public bool Excluido
+ {
+ get;
+ set;
+ }
+
+ public string Extensao
+ {
+ get
+ {
+ string str = this._extensao;
+ if (str == null)
+ {
+ return null;
+ }
+ return str.ToUpper().Trim();
+ }
+ set
+ {
+ this._extensao = value;
+ }
+ }
+
+ public long IdCliente
+ {
+ get;
+ set;
+ }
+
+ public long IdDocumento
+ {
+ get;
+ set;
+ }
+
+ public long IdEmpresa
+ {
+ get;
+ set;
+ }
+
+ public long IdEstipulante
+ {
+ get;
+ set;
+ }
+
+ public long IdExtrato
+ {
+ get;
+ set;
+ }
+
+ public long IdFornecedor
+ {
+ get;
+ set;
+ }
+
+ public long IdItem
+ {
+ get;
+ set;
+ }
+
+ public long IdLancamento
+ {
+ get;
+ set;
+ }
+
+ public long IdNotaFiscal
+ {
+ get;
+ set;
+ }
+
+ public long IdParcela
+ {
+ get;
+ set;
+ }
+
+ public long IdProspeccao
+ {
+ get;
+ set;
+ }
+
+ public long IdSeguradora
+ {
+ get;
+ set;
+ }
+
+ public long IdSinistro
+ {
+ get;
+ set;
+ }
+
+ public long IdSocio
+ {
+ get;
+ set;
+ }
+
+ public long IdTarefa
+ {
+ get;
+ set;
+ }
+
+ public long IdUsuario
+ {
+ get;
+ set;
+ }
+
+ public long IdVendedor
+ {
+ get;
+ set;
+ }
+
+ public int QuantidadeAcesso
+ {
+ get;
+ set;
+ }
+
+ public DateTime? UltimoAcesso
+ {
+ get;
+ set;
+ }
+
+ public long UsuarioAtualizacao
+ {
+ get;
+ set;
+ }
+
+ public long UsuarioCriacao
+ {
+ get;
+ set;
+ }
+
+ public ArquivoDigital()
+ {
+ }
+ }
+} \ No newline at end of file
diff --git a/Gestor.Model/Model.Domain.Common/Atividade.cs b/Gestor.Model/Model.Domain.Common/Atividade.cs
new file mode 100644
index 0000000..d5a67d7
--- /dev/null
+++ b/Gestor.Model/Model.Domain.Common/Atividade.cs
@@ -0,0 +1,50 @@
+using Gestor.Model.Domain.Generic;
+using System;
+
+namespace Gestor.Model.Domain.Common
+{
+ public class Atividade : DomainBase
+ {
+ private string _cnac;
+
+ private string _nome;
+
+ public string Cnac
+ {
+ get
+ {
+ string str = this._cnac;
+ if (str == null)
+ {
+ return null;
+ }
+ return str.ToUpper().Trim();
+ }
+ set
+ {
+ this._cnac = value;
+ }
+ }
+
+ public string Nome
+ {
+ get
+ {
+ string str = this._nome;
+ if (str != null)
+ {
+ return str.ToUpper();
+ }
+ return null;
+ }
+ set
+ {
+ this._nome = value;
+ }
+ }
+
+ public Atividade()
+ {
+ }
+ }
+} \ No newline at end of file
diff --git a/Gestor.Model/Model.Domain.Common/Banco.cs b/Gestor.Model/Model.Domain.Common/Banco.cs
new file mode 100644
index 0000000..b74b1d4
--- /dev/null
+++ b/Gestor.Model/Model.Domain.Common/Banco.cs
@@ -0,0 +1,87 @@
+using Gestor.Model.Attributes;
+using Gestor.Model.Domain.Generic;
+using Newtonsoft.Json;
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Runtime.CompilerServices;
+
+namespace Gestor.Model.Domain.Common
+{
+ public class Banco : IDomain
+ {
+ private string _nome;
+
+ private string _site;
+
+ [Log(true)]
+ public int Codigo
+ {
+ get;
+ set;
+ }
+
+ public int Id
+ {
+ get;
+ set;
+ }
+
+ [Description("BANCO")]
+ [Log(true)]
+ [Name(true)]
+ public string Nome
+ {
+ get
+ {
+ string str = this._nome;
+ if (str != null)
+ {
+ return str.ToUpper();
+ }
+ return null;
+ }
+ set
+ {
+ this._nome = value;
+ }
+ }
+
+ [Log(true)]
+ public string Site
+ {
+ get
+ {
+ string str = this._site;
+ if (str == null)
+ {
+ return null;
+ }
+ return str.ToUpper().Trim();
+ }
+ set
+ {
+ this._site = value;
+ }
+ }
+
+ [JsonIgnore]
+ public Func<List<KeyValuePair<string, string>>> ValidationEvent
+ {
+ get
+ {
+ Banco banco = this;
+ return new Func<List<KeyValuePair<string, string>>>(banco.Validate);
+ }
+ }
+
+ public Banco()
+ {
+ }
+
+ public List<KeyValuePair<string, string>> Validate()
+ {
+ return new List<KeyValuePair<string, string>>();
+ }
+ }
+} \ No newline at end of file
diff --git a/Gestor.Model/Model.Domain.Common/Contato.cs b/Gestor.Model/Model.Domain.Common/Contato.cs
new file mode 100644
index 0000000..5691e6e
--- /dev/null
+++ b/Gestor.Model/Model.Domain.Common/Contato.cs
@@ -0,0 +1,31 @@
+using Gestor.Model.Common;
+using System;
+using System.Runtime.CompilerServices;
+
+namespace Gestor.Model.Domain.Common
+{
+ public class Contato
+ {
+ public string Numero
+ {
+ get;
+ set;
+ }
+
+ public TipoContato Tipo
+ {
+ get;
+ set;
+ }
+
+ public Gestor.Model.Common.TipoTelefone? TipoTelefone
+ {
+ get;
+ set;
+ }
+
+ public Contato()
+ {
+ }
+ }
+} \ No newline at end of file
diff --git a/Gestor.Model/Model.Domain.Common/ControleArquivoDigital.cs b/Gestor.Model/Model.Domain.Common/ControleArquivoDigital.cs
new file mode 100644
index 0000000..de0c050
--- /dev/null
+++ b/Gestor.Model/Model.Domain.Common/ControleArquivoDigital.cs
@@ -0,0 +1,25 @@
+using Gestor.Model.Domain.Generic;
+using System;
+using System.Runtime.CompilerServices;
+
+namespace Gestor.Model.Domain.Common
+{
+ public class ControleArquivoDigital : DomainBase
+ {
+ public string Catalogo
+ {
+ get;
+ set;
+ }
+
+ public string Tabela
+ {
+ get;
+ set;
+ }
+
+ public ControleArquivoDigital()
+ {
+ }
+ }
+} \ No newline at end of file
diff --git a/Gestor.Model/Model.Domain.Common/Empresa.cs b/Gestor.Model/Model.Domain.Common/Empresa.cs
new file mode 100644
index 0000000..46a001c
--- /dev/null
+++ b/Gestor.Model/Model.Domain.Common/Empresa.cs
@@ -0,0 +1,546 @@
+using Gestor.Model.Common;
+using Gestor.Model.Domain.Generic;
+using Gestor.Model.Domain.Seguros;
+using Gestor.Model.Helper;
+using Gestor.Model.Resources;
+using Newtonsoft.Json;
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.Runtime.CompilerServices;
+
+namespace Gestor.Model.Domain.Common
+{
+ public class Empresa : EnderecoBase, IDomain
+ {
+ private string _nome;
+
+ private string _documento;
+
+ private string _serial;
+
+ private string _site;
+
+ private string _email;
+
+ private string _primeiroPrefixo;
+
+ private string _primeiroTelefone;
+
+ private string _segundoPrefixo;
+
+ private string _segundoTelefone;
+
+ private string _quantidadeFiliais;
+
+ private string _responsavel;
+
+ private string _emailResponsavel;
+
+ private TipoTelefone? _tipo1;
+
+ private TipoTelefone? _tipo2;
+
+ public string Documento
+ {
+ get
+ {
+ string str = this._documento;
+ if (str == null)
+ {
+ return null;
+ }
+ return str.ToUpper().Trim();
+ }
+ set
+ {
+ this._documento = value;
+ }
+ }
+
+ public string Email
+ {
+ get
+ {
+ string str = this._email;
+ if (str == null)
+ {
+ return null;
+ }
+ return str.ToLower().Trim();
+ }
+ set
+ {
+ this._email = value;
+ }
+ }
+
+ public string EmailResponsavel
+ {
+ get
+ {
+ string str = this._emailResponsavel;
+ if (str == null)
+ {
+ return null;
+ }
+ return str.ToLower().Trim();
+ }
+ set
+ {
+ this._emailResponsavel = value;
+ }
+ }
+
+ public string Facebook
+ {
+ get;
+ set;
+ }
+
+ public string Instagram
+ {
+ get;
+ set;
+ }
+
+ public string Linkdin
+ {
+ get;
+ set;
+ }
+
+ public string Localizacao
+ {
+ get;
+ set;
+ }
+
+ public byte[] Logo
+ {
+ get;
+ set;
+ }
+
+ public string LogoId
+ {
+ get;
+ set;
+ }
+
+ public int MaxFileSize
+ {
+ get;
+ set;
+ }
+
+ public string Nome
+ {
+ get
+ {
+ string str = this._nome;
+ if (str != null)
+ {
+ return str.ToUpper();
+ }
+ return null;
+ }
+ set
+ {
+ this._nome = value;
+ }
+ }
+
+ public string NomeSocial
+ {
+ get;
+ set;
+ }
+
+ public string PrimeiroPrefixo
+ {
+ get
+ {
+ string str = this._primeiroPrefixo;
+ if (str == null)
+ {
+ return null;
+ }
+ return str.ToUpper().Trim();
+ }
+ set
+ {
+ this._primeiroPrefixo = value;
+ }
+ }
+
+ public string PrimeiroTelefone
+ {
+ get
+ {
+ string str = this._primeiroTelefone;
+ if (str == null)
+ {
+ return null;
+ }
+ return str.ToUpper().Trim();
+ }
+ set
+ {
+ this._primeiroTelefone = value;
+ }
+ }
+
+ public string QuantidadeFiliais
+ {
+ get
+ {
+ string str = this._quantidadeFiliais;
+ if (str == null)
+ {
+ return null;
+ }
+ return str.ToUpper().Trim();
+ }
+ set
+ {
+ this._quantidadeFiliais = value;
+ }
+ }
+
+ public long QuantidadeFuncionarios
+ {
+ get;
+ set;
+ }
+
+ public string Responsavel
+ {
+ get
+ {
+ string str = this._responsavel;
+ if (str != null)
+ {
+ return str.ToUpper();
+ }
+ return null;
+ }
+ set
+ {
+ this._responsavel = value;
+ }
+ }
+
+ public string SegundoPrefixo
+ {
+ get
+ {
+ string str = this._segundoPrefixo;
+ if (str == null)
+ {
+ return null;
+ }
+ return str.ToUpper().Trim();
+ }
+ set
+ {
+ this._segundoPrefixo = value;
+ }
+ }
+
+ public string SegundoTelefone
+ {
+ get
+ {
+ string str = this._segundoTelefone;
+ if (str == null)
+ {
+ return null;
+ }
+ return str.ToUpper().Trim();
+ }
+ set
+ {
+ this._segundoTelefone = value;
+ }
+ }
+
+ public string SenhaAdmin
+ {
+ get;
+ set;
+ }
+
+ public string Serial
+ {
+ get
+ {
+ string str = this._serial;
+ if (str == null)
+ {
+ return null;
+ }
+ return str.ToUpper().Trim();
+ }
+ set
+ {
+ this._serial = value;
+ }
+ }
+
+ public string Site
+ {
+ get
+ {
+ string str = this._site;
+ if (str != null)
+ {
+ return str.Trim();
+ }
+ return null;
+ }
+ set
+ {
+ this._site = value;
+ }
+ }
+
+ public TipoTelefone TipoTelefone1
+ {
+ get
+ {
+ if (this._tipo1.HasValue)
+ {
+ TipoTelefone? nullable = this._tipo1;
+ if (!((int)nullable.GetValueOrDefault() == 0 & nullable.HasValue))
+ {
+ return this._tipo1.Value;
+ }
+ }
+ return TipoTelefone.Comercial;
+ }
+ set
+ {
+ this._tipo1 = new TipoTelefone?(value);
+ }
+ }
+
+ public TipoTelefone TipoTelefone2
+ {
+ get
+ {
+ if (this._tipo2.HasValue)
+ {
+ TipoTelefone? nullable = this._tipo2;
+ if (!((int)nullable.GetValueOrDefault() == 0 & nullable.HasValue))
+ {
+ return this._tipo2.Value;
+ }
+ }
+ return TipoTelefone.Comercial;
+ }
+ set
+ {
+ this._tipo2 = new TipoTelefone?(value);
+ }
+ }
+
+ public string Twitter
+ {
+ get;
+ set;
+ }
+
+ [JsonIgnore]
+ public Func<List<KeyValuePair<string, string>>> ValidationEvent
+ {
+ get
+ {
+ Empresa empresa = this;
+ return new Func<List<KeyValuePair<string, string>>>(empresa.Validate);
+ }
+ }
+
+ public string Whatsapp
+ {
+ get;
+ set;
+ }
+
+ public string WhatsappSinistro
+ {
+ get;
+ set;
+ }
+
+ public Empresa()
+ {
+ }
+
+ public List<TupleList> Log()
+ {
+ List<TupleList> tupleLists = new List<TupleList>();
+ TupleList tupleList = new TupleList();
+ ObservableCollection<Tuple<string, string, string>> observableCollection = new ObservableCollection<Tuple<string, string, string>>()
+ {
+ new Tuple<string, string, string>("DOCUMENTO (CPF/CNPJ)", (string.IsNullOrWhiteSpace(this.Documento) ? "" : this.Documento), ""),
+ new Tuple<string, string, string>("NÚMERO DE SÉRIE", (string.IsNullOrWhiteSpace(this.Serial) ? "" : this.Serial), ""),
+ new Tuple<string, string, string>("NOME", (string.IsNullOrWhiteSpace(this.Nome) ? "" : this.Nome), ""),
+ new Tuple<string, string, string>("CEP", (string.IsNullOrWhiteSpace(base.Cep) ? "" : base.Cep), ""),
+ new Tuple<string, string, string>("ENDEREÇO", (string.IsNullOrWhiteSpace(base.Endereco) ? "" : base.Endereco), ""),
+ new Tuple<string, string, string>("NÚMERO", (string.IsNullOrWhiteSpace(base.Numero) ? "" : base.Numero), ""),
+ new Tuple<string, string, string>("BAIRRO", (string.IsNullOrWhiteSpace(base.Bairro) ? "" : base.Bairro), ""),
+ new Tuple<string, string, string>("CIDADE", (string.IsNullOrWhiteSpace(base.Cidade) ? "" : base.Cidade), ""),
+ new Tuple<string, string, string>("ESTADO", (string.IsNullOrWhiteSpace(base.Estado) ? "" : base.Estado), ""),
+ new Tuple<string, string, string>("SITE", (string.IsNullOrWhiteSpace(this.Site) ? "" : this.Site), ""),
+ new Tuple<string, string, string>("E-MAIL", (string.IsNullOrWhiteSpace(this.Email) ? "" : this.Email), ""),
+ new Tuple<string, string, string>("PRIMEIRO PREFIXO", (string.IsNullOrWhiteSpace(this.PrimeiroPrefixo) ? "" : this.PrimeiroPrefixo), ""),
+ new Tuple<string, string, string>("PRIMEIRO TELEFONE", (string.IsNullOrWhiteSpace(this.PrimeiroTelefone) ? "" : this.PrimeiroTelefone), ""),
+ new Tuple<string, string, string>("SEGUNDO PREFIXO", (string.IsNullOrWhiteSpace(this.SegundoPrefixo) ? "" : this.SegundoPrefixo), ""),
+ new Tuple<string, string, string>("SEGUNDO TELEFONE", (string.IsNullOrWhiteSpace(this.SegundoTelefone) ? "" : this.SegundoTelefone), ""),
+ new Tuple<string, string, string>("E-MAIL", (string.IsNullOrWhiteSpace(this.Email) ? "" : this.Email), "")
+ };
+ long quantidadeFuncionarios = this.QuantidadeFuncionarios;
+ observableCollection.Add(new Tuple<string, string, string>("NÚMERO DE FUNCIONÁRIOS", quantidadeFuncionarios.ToString(), ""));
+ observableCollection.Add(new Tuple<string, string, string>("RESPONSÁVEL FINANCEIRO", (string.IsNullOrWhiteSpace(this.Responsavel) ? "" : this.Responsavel), ""));
+ observableCollection.Add(new Tuple<string, string, string>("E-MAIL DO RESPONSÁVEL", (string.IsNullOrWhiteSpace(this.EmailResponsavel) ? "" : this.EmailResponsavel), ""));
+ tupleList.Tuples = observableCollection;
+ tupleLists.Add(tupleList);
+ return tupleLists;
+ }
+
+ public List<KeyValuePair<string, string>> Validate()
+ {
+ List<KeyValuePair<string, string>> keyValuePairs = ValidationHelper.AddValue();
+ if (string.IsNullOrWhiteSpace(this.Documento))
+ {
+ keyValuePairs.AddValue<string, string>("Documento", Messages.Obrigatorio, true);
+ }
+ else if (!this.Documento.ValidacaoDocumento())
+ {
+ keyValuePairs.AddValue<string, string>("Documento", Messages.Invalido, true);
+ }
+ if (string.IsNullOrWhiteSpace(this.Serial))
+ {
+ keyValuePairs.AddValue<string, string>("Serial", Messages.Obrigatorio, true);
+ }
+ else if (this.Serial.Length > 18)
+ {
+ keyValuePairs.AddValue<string, string>("Serial", string.Format(Messages.MaiorQueLimite, 18), true);
+ }
+ if (!string.IsNullOrWhiteSpace(this.Site) && this.Site.Length > 80)
+ {
+ keyValuePairs.AddValue<string, string>("Site", string.Format(Messages.MaiorQueLimite, 80), true);
+ }
+ if (!string.IsNullOrWhiteSpace(this.SenhaAdmin) && this.SenhaAdmin.Length > 90)
+ {
+ keyValuePairs.AddValue<string, string>("SenhaAdmin", string.Format(Messages.MaiorQueLimite, 90), true);
+ }
+ if (string.IsNullOrWhiteSpace(this.Nome))
+ {
+ keyValuePairs.AddValue<string, string>("Nome", Messages.Obrigatorio, true);
+ }
+ else if (this.Nome.Length > 60)
+ {
+ keyValuePairs.AddValue<string, string>("Nome", string.Format(Messages.MaiorQueLimite, 60), true);
+ }
+ if (string.IsNullOrWhiteSpace(base.Cep))
+ {
+ keyValuePairs.AddValue<string, string>("Cep", Messages.Obrigatorio, true);
+ }
+ else if (!base.Cep.ValidacaoCep())
+ {
+ keyValuePairs.AddValue<string, string>("Cep", Messages.Invalido, true);
+ }
+ if (string.IsNullOrWhiteSpace(base.Endereco))
+ {
+ keyValuePairs.AddValue<string, string>("Endereco", Messages.Obrigatorio, true);
+ }
+ else if (base.Endereco.Length > 60)
+ {
+ keyValuePairs.AddValue<string, string>("Endereco", string.Format(Messages.MaiorQueLimite, 60), true);
+ }
+ if (string.IsNullOrWhiteSpace(base.Numero))
+ {
+ keyValuePairs.AddValue<string, string>("Numero", Messages.Obrigatorio, true);
+ }
+ else if (base.Numero.Length > 10)
+ {
+ keyValuePairs.AddValue<string, string>("Numero", string.Format(Messages.MaiorQueLimite, 10), true);
+ }
+ if (!string.IsNullOrWhiteSpace(base.Complemento) && base.Complemento.Length > 100)
+ {
+ keyValuePairs.AddValue<string, string>("Complemento", string.Format(Messages.MaiorQueLimite, 100), true);
+ }
+ if (string.IsNullOrWhiteSpace(base.Bairro))
+ {
+ keyValuePairs.AddValue<string, string>("Bairro", Messages.Obrigatorio, true);
+ }
+ else if (base.Bairro.Length > 150)
+ {
+ keyValuePairs.AddValue<string, string>("Bairro", string.Format(Messages.MaiorQueLimite, 150), true);
+ }
+ if (string.IsNullOrWhiteSpace(base.Cidade))
+ {
+ keyValuePairs.AddValue<string, string>("Cidade", Messages.Obrigatorio, true);
+ }
+ else if (base.Cidade.Length > 30)
+ {
+ keyValuePairs.AddValue<string, string>("Cidade", string.Format(Messages.MaiorQueLimite, 30), true);
+ }
+ if (string.IsNullOrWhiteSpace(base.Estado))
+ {
+ keyValuePairs.AddValue<string, string>("Estado", Messages.Obrigatorio, true);
+ }
+ else if (!base.Estado.ValidacaoEstado())
+ {
+ keyValuePairs.AddValue<string, string>("Estado", Messages.Invalido, true);
+ }
+ if (string.IsNullOrWhiteSpace(this.Email))
+ {
+ keyValuePairs.AddValue<string, string>("Email", Messages.Obrigatorio, true);
+ }
+ else if (!this.Email.ValidacaoEmail())
+ {
+ keyValuePairs.AddValue<string, string>("Email", Messages.Invalido, true);
+ }
+ else if (this.Email.Length > 50)
+ {
+ keyValuePairs.AddValue<string, string>("Email", string.Format(Messages.MaiorQueLimite, 50), true);
+ }
+ if (string.IsNullOrWhiteSpace(this.EmailResponsavel))
+ {
+ keyValuePairs.AddValue<string, string>("EmailResponsavel", Messages.Obrigatorio, true);
+ }
+ else if (!this.EmailResponsavel.ValidacaoEmail())
+ {
+ keyValuePairs.AddValue<string, string>("EmailResponsavel", Messages.Invalido, true);
+ }
+ else if (this.EmailResponsavel.Length > 50)
+ {
+ keyValuePairs.AddValue<string, string>("EmailResponsavel", string.Format(Messages.MaiorQueLimite, 50), true);
+ }
+ if (!string.IsNullOrEmpty(this.Facebook) && !this.Facebook.Contains("http"))
+ {
+ this.Facebook = string.Concat("https://", this.Facebook.Trim());
+ }
+ if (!string.IsNullOrEmpty(this.Instagram) && !this.Instagram.Contains("http"))
+ {
+ this.Instagram = string.Concat("https://", this.Instagram.Trim());
+ }
+ if (!string.IsNullOrEmpty(this.Linkdin) && !this.Linkdin.Contains("http"))
+ {
+ this.Linkdin = string.Concat("https://", this.Linkdin.Trim());
+ }
+ if (!string.IsNullOrEmpty(this.Twitter) && !this.Twitter.Contains("http"))
+ {
+ this.Twitter = string.Concat("https://", this.Twitter.Trim());
+ }
+ if (!string.IsNullOrEmpty(this.Site) && !this.Site.Contains("http"))
+ {
+ this.Site = string.Concat("http://", this.Site.Trim());
+ }
+ return keyValuePairs;
+ }
+ }
+} \ No newline at end of file
diff --git a/Gestor.Model/Model.Domain.Common/Fipe.cs b/Gestor.Model/Model.Domain.Common/Fipe.cs
new file mode 100644
index 0000000..3a3accc
--- /dev/null
+++ b/Gestor.Model/Model.Domain.Common/Fipe.cs
@@ -0,0 +1,138 @@
+using Gestor.Model.Helper;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Runtime.CompilerServices;
+
+namespace Gestor.Model.Domain.Common
+{
+ public class Fipe
+ {
+ private string _codigo;
+
+ private string _marca;
+
+ private string _modelo;
+
+ private int _anoMaximo;
+
+ private int _anoMinimo;
+
+ public int AnoMaximo
+ {
+ get
+ {
+ if (this.Detalhes == null || this.Detalhes.Count == 0)
+ {
+ return this._anoMaximo;
+ }
+ return (
+ from d in this.Detalhes
+ orderby d.AnoModelo descending
+ select d).First<FipeDetalhe>().AnoModelo.ToInt();
+ }
+ set
+ {
+ if (this.Detalhes == null || this.Detalhes.Count == 0)
+ {
+ this._anoMaximo = value;
+ }
+ }
+ }
+
+ public int AnoMinimo
+ {
+ get
+ {
+ if (this.Detalhes == null || this.Detalhes.Count == 0)
+ {
+ return this._anoMinimo;
+ }
+ return (
+ from d in this.Detalhes
+ orderby d.AnoModelo
+ select d).First<FipeDetalhe>().AnoModelo.ToInt();
+ }
+ set
+ {
+ if (this.Detalhes == null || this.Detalhes.Count == 0)
+ {
+ this._anoMinimo = value;
+ }
+ }
+ }
+
+ public string Codigo
+ {
+ get
+ {
+ string str = this._codigo;
+ if (str == null)
+ {
+ return null;
+ }
+ return str.ToUpper().Trim();
+ }
+ set
+ {
+ this._codigo = value;
+ }
+ }
+
+ public List<FipeDetalhe> Detalhes
+ {
+ get;
+ set;
+ }
+
+ public int? IdFabricante
+ {
+ get;
+ set;
+ }
+
+ public string Marca
+ {
+ get
+ {
+ string str = this._marca;
+ if (str != null)
+ {
+ return str.ToUpper();
+ }
+ return null;
+ }
+ set
+ {
+ this._marca = value;
+ }
+ }
+
+ public string Modelo
+ {
+ get
+ {
+ string str = this._modelo;
+ if (str != null)
+ {
+ return str.ToUpper();
+ }
+ return null;
+ }
+ set
+ {
+ this._modelo = value;
+ }
+ }
+
+ public int TipoVeiculo
+ {
+ get;
+ set;
+ }
+
+ public Fipe()
+ {
+ }
+ }
+} \ No newline at end of file
diff --git a/Gestor.Model/Model.Domain.Common/FipeDetalhe.cs b/Gestor.Model/Model.Domain.Common/FipeDetalhe.cs
new file mode 100644
index 0000000..c3a2803
--- /dev/null
+++ b/Gestor.Model/Model.Domain.Common/FipeDetalhe.cs
@@ -0,0 +1,24 @@
+using System;
+using System.Runtime.CompilerServices;
+
+namespace Gestor.Model.Domain.Common
+{
+ public class FipeDetalhe
+ {
+ public string AnoModelo
+ {
+ get;
+ set;
+ }
+
+ public decimal Valor
+ {
+ get;
+ set;
+ }
+
+ public FipeDetalhe()
+ {
+ }
+ }
+} \ No newline at end of file
diff --git a/Gestor.Model/Model.Domain.Common/IndiceArquivoDigital.cs b/Gestor.Model/Model.Domain.Common/IndiceArquivoDigital.cs
new file mode 100644
index 0000000..b50be29
--- /dev/null
+++ b/Gestor.Model/Model.Domain.Common/IndiceArquivoDigital.cs
@@ -0,0 +1,246 @@
+using Gestor.Model.Attributes;
+using Gestor.Model.Domain.Generic;
+using System;
+using System.Runtime.CompilerServices;
+
+namespace Gestor.Model.Domain.Common
+{
+ public class IndiceArquivoDigital : DomainBase
+ {
+ private string _descricao;
+
+ private string _extensao;
+
+ public bool Assinado
+ {
+ get;
+ set;
+ }
+
+ public bool Assinar
+ {
+ get;
+ set;
+ }
+
+ public Guid? AzureGuid
+ {
+ get;
+ set;
+ }
+
+ public string AzureStorage
+ {
+ get;
+ set;
+ }
+
+ public string Bd
+ {
+ get;
+ set;
+ }
+
+ public DateTime? DataAtualizacao
+ {
+ get;
+ set;
+ }
+
+ public DateTime? DataCriacao
+ {
+ get;
+ set;
+ }
+
+ [Log(true)]
+ [Name(true)]
+ public string Descricao
+ {
+ get
+ {
+ string str = this._descricao;
+ if (str != null)
+ {
+ return str.ToUpper();
+ }
+ return null;
+ }
+ set
+ {
+ this._descricao = value;
+ }
+ }
+
+ public bool EnviadoAssinatura
+ {
+ get;
+ set;
+ }
+
+ public bool Excluido
+ {
+ get;
+ set;
+ }
+
+ public string Extensao
+ {
+ get
+ {
+ string str = this._extensao;
+ if (str == null)
+ {
+ return null;
+ }
+ return str.ToUpper().Trim();
+ }
+ set
+ {
+ this._extensao = value;
+ }
+ }
+
+ public long IdArquivoDigital
+ {
+ get;
+ set;
+ }
+
+ public long IdCliente
+ {
+ get;
+ set;
+ }
+
+ public long IdDocumento
+ {
+ get;
+ set;
+ }
+
+ public long IdEmpresa
+ {
+ get;
+ set;
+ }
+
+ public long IdEstipulante
+ {
+ get;
+ set;
+ }
+
+ public long IdExtrato
+ {
+ get;
+ set;
+ }
+
+ public long IdFornecedor
+ {
+ get;
+ set;
+ }
+
+ public long IdItem
+ {
+ get;
+ set;
+ }
+
+ public long IdLancamento
+ {
+ get;
+ set;
+ }
+
+ public long IdNotaFiscal
+ {
+ get;
+ set;
+ }
+
+ public long IdParcela
+ {
+ get;
+ set;
+ }
+
+ public long IdProspeccao
+ {
+ get;
+ set;
+ }
+
+ public long IdSeguradora
+ {
+ get;
+ set;
+ }
+
+ public long IdSinistro
+ {
+ get;
+ set;
+ }
+
+ public long IdSocio
+ {
+ get;
+ set;
+ }
+
+ public long IdTarefa
+ {
+ get;
+ set;
+ }
+
+ public long IdUsuario
+ {
+ get;
+ set;
+ }
+
+ public long IdVendedor
+ {
+ get;
+ set;
+ }
+
+ public bool NaoExcluir
+ {
+ get;
+ set;
+ }
+
+ public bool Selecionado
+ {
+ get;
+ set;
+ }
+
+ public string UrlAssinatura
+ {
+ get;
+ set;
+ }
+
+ public long UsuarioAtualizacao
+ {
+ get;
+ set;
+ }
+
+ public long UsuarioCriacao
+ {
+ get;
+ set;
+ }
+
+ public IndiceArquivoDigital()
+ {
+ }
+ }
+} \ No newline at end of file
diff --git a/Gestor.Model/Model.Domain.Common/PesquisaAvancada.cs b/Gestor.Model/Model.Domain.Common/PesquisaAvancada.cs
new file mode 100644
index 0000000..452988b
--- /dev/null
+++ b/Gestor.Model/Model.Domain.Common/PesquisaAvancada.cs
@@ -0,0 +1,55 @@
+using Gestor.Model.Common;
+using System;
+using System.Runtime.CompilerServices;
+
+namespace Gestor.Model.Domain.Common
+{
+ public class PesquisaAvancada
+ {
+ public long IdCliente
+ {
+ get;
+ set;
+ }
+
+ public long IdDocumento
+ {
+ get;
+ set;
+ }
+
+ public long IdItem
+ {
+ get;
+ set;
+ }
+
+ public long IdSinistro
+ {
+ get;
+ set;
+ }
+
+ public string Nome
+ {
+ get;
+ set;
+ }
+
+ public string Pesquisa
+ {
+ get;
+ set;
+ }
+
+ public FiltroStatusDocumento Status
+ {
+ get;
+ set;
+ }
+
+ public PesquisaAvancada()
+ {
+ }
+ }
+} \ No newline at end of file
diff --git a/Gestor.Model/Model.Domain.Common/Profissao.cs b/Gestor.Model/Model.Domain.Common/Profissao.cs
new file mode 100644
index 0000000..d4b6380
--- /dev/null
+++ b/Gestor.Model/Model.Domain.Common/Profissao.cs
@@ -0,0 +1,69 @@
+using Gestor.Model.Domain.Generic;
+using System;
+
+namespace Gestor.Model.Domain.Common
+{
+ public class Profissao : DomainBase
+ {
+ private string _codigo;
+
+ private string _nome;
+
+ private string _aniversario;
+
+ public string Aniversario
+ {
+ get
+ {
+ string str = this._aniversario;
+ if (str == null)
+ {
+ return null;
+ }
+ return str.ToUpper().Trim();
+ }
+ set
+ {
+ this._aniversario = value;
+ }
+ }
+
+ public string Codigo
+ {
+ get
+ {
+ string str = this._codigo;
+ if (str == null)
+ {
+ return null;
+ }
+ return str.ToUpper().Trim();
+ }
+ set
+ {
+ this._codigo = value;
+ }
+ }
+
+ public string Nome
+ {
+ get
+ {
+ string str = this._nome;
+ if (str != null)
+ {
+ return str.ToUpper();
+ }
+ return null;
+ }
+ set
+ {
+ this._nome = value;
+ }
+ }
+
+ public Profissao()
+ {
+ }
+ }
+} \ No newline at end of file
diff --git a/Gestor.Model/Model.Domain.Common/RegistroAcao.cs b/Gestor.Model/Model.Domain.Common/RegistroAcao.cs
new file mode 100644
index 0000000..d89a8d4
--- /dev/null
+++ b/Gestor.Model/Model.Domain.Common/RegistroAcao.cs
@@ -0,0 +1,81 @@
+using Gestor.Model.Common;
+using Gestor.Model.Domain.Generic;
+using Gestor.Model.Domain.Seguros;
+using System;
+using System.Runtime.CompilerServices;
+
+namespace Gestor.Model.Domain.Common
+{
+ public class RegistroAcao : DomainBase
+ {
+ public DateTime DataHora
+ {
+ get;
+ set;
+ }
+
+ public string Descricao
+ {
+ get;
+ set;
+ }
+
+ public long EntidadeId
+ {
+ get;
+ set;
+ }
+
+ public string Ip
+ {
+ get;
+ set;
+ }
+
+ public string NomeMaquina
+ {
+ get;
+ set;
+ }
+
+ public string Observacao
+ {
+ get;
+ set;
+ }
+
+ public Gestor.Model.Common.Relatorio? Relatorio
+ {
+ get;
+ set;
+ }
+
+ public TipoTela? Tela
+ {
+ get;
+ set;
+ }
+
+ public Gestor.Model.Domain.Seguros.Usuario Usuario
+ {
+ get;
+ set;
+ }
+
+ public string UsuarioMaquina
+ {
+ get;
+ set;
+ }
+
+ public string Versao
+ {
+ get;
+ set;
+ }
+
+ public RegistroAcao()
+ {
+ }
+ }
+} \ No newline at end of file
diff --git a/Gestor.Model/Model.Domain.Common/RegistroLog.cs b/Gestor.Model/Model.Domain.Common/RegistroLog.cs
new file mode 100644
index 0000000..4fd1044
--- /dev/null
+++ b/Gestor.Model/Model.Domain.Common/RegistroLog.cs
@@ -0,0 +1,81 @@
+using Gestor.Model.Common;
+using Gestor.Model.Domain.Generic;
+using Gestor.Model.Domain.Seguros;
+using System;
+using System.Runtime.CompilerServices;
+
+namespace Gestor.Model.Domain.Common
+{
+ public class RegistroLog : DomainBase
+ {
+ public TipoAcao Acao
+ {
+ get;
+ set;
+ }
+
+ public DateTime DataHora
+ {
+ get;
+ set;
+ }
+
+ public string Descricao
+ {
+ get;
+ set;
+ }
+
+ public long EntidadeId
+ {
+ get;
+ set;
+ }
+
+ public string Ip
+ {
+ get;
+ set;
+ }
+
+ public bool ModeloNovo
+ {
+ get;
+ set;
+ }
+
+ public string NomeMaquina
+ {
+ get;
+ set;
+ }
+
+ public TipoTela Tela
+ {
+ get;
+ set;
+ }
+
+ public Gestor.Model.Domain.Seguros.Usuario Usuario
+ {
+ get;
+ set;
+ }
+
+ public string UsuarioMaquina
+ {
+ get;
+ set;
+ }
+
+ public string Versao
+ {
+ get;
+ set;
+ }
+
+ public RegistroLog()
+ {
+ }
+ }
+} \ No newline at end of file
diff --git a/Gestor.Model/Model.Domain.Common/Socio.cs b/Gestor.Model/Model.Domain.Common/Socio.cs
new file mode 100644
index 0000000..bf1da0c
--- /dev/null
+++ b/Gestor.Model/Model.Domain.Common/Socio.cs
@@ -0,0 +1,159 @@
+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;
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.ComponentModel;
+using System.Runtime.CompilerServices;
+
+namespace Gestor.Model.Domain.Common
+{
+ public class Socio : EnderecoBase, IDomain
+ {
+ private string _nome;
+
+ private string _email;
+
+ private string _prefixo;
+
+ private string _telefone;
+
+ [Description("E-MAIL")]
+ [Log(true)]
+ public string Email
+ {
+ get
+ {
+ string str = this._email;
+ if (str == null)
+ {
+ return null;
+ }
+ return str.ToLower().Trim();
+ }
+ set
+ {
+ this._email = value;
+ }
+ }
+
+ public bool Excluido
+ {
+ get;
+ set;
+ }
+
+ public long IdEmpresa
+ {
+ get;
+ set;
+ }
+
+ [Log(true)]
+ [Name(true)]
+ public string Nome
+ {
+ get
+ {
+ string str = this._nome;
+ if (str != null)
+ {
+ return str.ToUpper();
+ }
+ return null;
+ }
+ set
+ {
+ this._nome = value;
+ }
+ }
+
+ [Description("PREFIXO")]
+ [Log(true)]
+ public string Prefixo
+ {
+ get
+ {
+ string str = this._prefixo;
+ if (str == null)
+ {
+ return null;
+ }
+ return str.ToUpper().Trim();
+ }
+ set
+ {
+ this._prefixo = value;
+ }
+ }
+
+ [Description("TELEFONE")]
+ [Log(true)]
+ public string Telefone
+ {
+ get
+ {
+ string str = this._telefone;
+ if (str == null)
+ {
+ return null;
+ }
+ return str.ToUpper().Trim();
+ }
+ set
+ {
+ this._telefone = value;
+ }
+ }
+
+ [JsonIgnore]
+ public Func<List<KeyValuePair<string, string>>> ValidationEvent
+ {
+ get
+ {
+ Socio socio = this;
+ return new Func<List<KeyValuePair<string, string>>>(socio.Validate);
+ }
+ }
+
+ public Socio()
+ {
+ }
+
+ public List<TupleList> Log()
+ {
+ return new List<TupleList>()
+ {
+ new TupleList()
+ {
+ Tuples = new ObservableCollection<Tuple<string, string, string>>()
+ {
+ new Tuple<string, string, string>("NOME", (string.IsNullOrWhiteSpace(this.Nome) ? "" : this.Nome), ""),
+ new Tuple<string, string, string>("E-MAIL", (string.IsNullOrWhiteSpace(this.Email) ? "" : this.Email), ""),
+ new Tuple<string, string, string>("PREFIXO", (string.IsNullOrWhiteSpace(this.Prefixo) ? "" : this.Prefixo), ""),
+ new Tuple<string, string, string>("TELEFONE", (string.IsNullOrWhiteSpace(this.Telefone) ? "" : this.Telefone), ""),
+ new Tuple<string, string, string>("E-MAIL", (string.IsNullOrWhiteSpace(this.Email) ? "" : this.Email), "")
+ }
+ }
+ };
+ }
+
+ public List<KeyValuePair<string, string>> Validate()
+ {
+ List<KeyValuePair<string, string>> keyValuePairs = ValidationHelper.AddValue();
+ if (string.IsNullOrWhiteSpace(this.Nome))
+ {
+ keyValuePairs.AddValue<string, string>("Nome", Messages.Obrigatorio, true);
+ }
+ else if (this.Nome.Length > 60)
+ {
+ keyValuePairs.AddValue<string, string>("Nome", string.Format(Messages.MaiorQueLimite, 60), true);
+ }
+ return keyValuePairs;
+ }
+ }
+} \ No newline at end of file
diff --git a/Gestor.Model/Model.Domain.Common/TrocaCliente.cs b/Gestor.Model/Model.Domain.Common/TrocaCliente.cs
new file mode 100644
index 0000000..00b03e1
--- /dev/null
+++ b/Gestor.Model/Model.Domain.Common/TrocaCliente.cs
@@ -0,0 +1,117 @@
+using Gestor.Model.Domain.Seguros;
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+
+namespace Gestor.Model.Domain.Common
+{
+ public class TrocaCliente
+ {
+ private string _descricao;
+
+ private long _idClienteTrocado;
+
+ private string _nomeClienteTrocado;
+
+ private long _idclienteNovo;
+
+ private string _nomeClienteNovo;
+
+ private Gestor.Model.Domain.Seguros.Documento _documento;
+
+ public string Descricao
+ {
+ get
+ {
+ string str = this._descricao;
+ if (str != null)
+ {
+ return str.ToUpper();
+ }
+ return null;
+ }
+ set
+ {
+ this._descricao = value;
+ }
+ }
+
+ public Gestor.Model.Domain.Seguros.Documento Documento
+ {
+ get
+ {
+ return this._documento;
+ }
+ set
+ {
+ this._documento = value;
+ }
+ }
+
+ public long IdClienteNovo
+ {
+ get
+ {
+ return this._idclienteNovo;
+ }
+ set
+ {
+ this._idclienteNovo = value;
+ }
+ }
+
+ public long IdClienteTrocado
+ {
+ get
+ {
+ return this._idClienteTrocado;
+ }
+ set
+ {
+ this._idClienteTrocado = value;
+ }
+ }
+
+ public string NomeClienteNovo
+ {
+ get
+ {
+ return this._nomeClienteNovo;
+ }
+ set
+ {
+ this._nomeClienteNovo = value;
+ }
+ }
+
+ public string NomeClienteTrocado
+ {
+ get
+ {
+ return this._nomeClienteTrocado;
+ }
+ set
+ {
+ this._nomeClienteTrocado = value;
+ }
+ }
+
+ public TrocaCliente()
+ {
+ }
+
+ public List<TupleList> Log()
+ {
+ return new List<TupleList>()
+ {
+ new TupleList()
+ {
+ Tuples = new ObservableCollection<Tuple<string, string, string>>()
+ {
+ new Tuple<string, string, string>("DESCRICAO", (string.IsNullOrWhiteSpace(this.Descricao) ? "" : this.Descricao), "")
+ }
+ }
+ };
+ }
+ }
+} \ No newline at end of file