diff options
| author | Lucas Faria Mendes <lucas.fariamo08@gmail.com> | 2026-03-30 13:38:18 +0000 |
|---|---|---|
| committer | Lucas Faria Mendes <lucas.fariamo08@gmail.com> | 2026-03-30 13:38:18 +0000 |
| commit | 1f4e14b2e973ee7de337fd4866d9a5ceff5cb6d1 (patch) | |
| tree | e1c3b20ea08f0cf71122a1e73f0d395f8fd83874 /Codemerx/Gestor.Infrastructure/Gestor.Infrastructure.Mappings.Seguros/ClienteMap.cs | |
| parent | 674ca83ba9243a9e95a7568c797668dab6aee26a (diff) | |
| download | gestor-1f4e14b2e973ee7de337fd4866d9a5ceff5cb6d1.tar.gz gestor-1f4e14b2e973ee7de337fd4866d9a5ceff5cb6d1.zip | |
chore: location
Diffstat (limited to 'Codemerx/Gestor.Infrastructure/Gestor.Infrastructure.Mappings.Seguros/ClienteMap.cs')
| -rw-r--r-- | Codemerx/Gestor.Infrastructure/Gestor.Infrastructure.Mappings.Seguros/ClienteMap.cs | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/Codemerx/Gestor.Infrastructure/Gestor.Infrastructure.Mappings.Seguros/ClienteMap.cs b/Codemerx/Gestor.Infrastructure/Gestor.Infrastructure.Mappings.Seguros/ClienteMap.cs new file mode 100644 index 0000000..9195651 --- /dev/null +++ b/Codemerx/Gestor.Infrastructure/Gestor.Infrastructure.Mappings.Seguros/ClienteMap.cs @@ -0,0 +1,53 @@ +using FluentNHibernate.Mapping;
+using Gestor.Infrastructure.Entities.Common;
+using Gestor.Infrastructure.Entities.Generic;
+using Gestor.Infrastructure.Entities.Seguros;
+using System;
+using System.Linq.Expressions;
+using System.Runtime.CompilerServices;
+
+namespace Gestor.Infrastructure.Mappings.Seguros
+{
+ public class ClienteMap : ClassMap<ClienteDb>
+ {
+ public ClienteMap()
+ {
+ base.Table("cliente");
+ base.LazyLoad();
+ base.Id((ClienteDb x) => (object)x.Id).GeneratedBy.Identity().Column("idcliente");
+ base.References<AtividadeDb>((ClienteDb x) => x.Atividade).Column("idatividade").Fetch.Join().NotFound.Ignore();
+ base.References<ProfissaoDb>((ClienteDb x) => x.Profissao).Column("idprofissao").Fetch.Join().NotFound.Ignore();
+ base.References<BancoDb>((ClienteDb x) => x.Banco).Column("idcodigobanco").Fetch.Join().NotFound.Ignore();
+ base.Map((ClienteDb x) => (object)x.IdEmpresa).Column("idempresa").Not.Nullable();
+ base.Map((ClienteDb x) => x.Nome).Column("nome").Not.Nullable();
+ base.Map((ClienteDb x) => (object)x.Nascimento).Column("dtnasc");
+ base.Map((ClienteDb x) => (object)x.Sexo).CustomType<CustomEnumType<Sexo>>().Column("sexo");
+ base.Map((ClienteDb x) => (object)x.EstadoCivil).CustomType<CustomEnumType<EstadoCivil>>().Column("estadocivi");
+ base.Map((ClienteDb x) => x.Documento).Column("cgccpf");
+ base.Map((ClienteDb x) => x.Identidade).Column("rg");
+ base.Map((ClienteDb x) => x.Emissor).Column("emissor");
+ base.Map((ClienteDb x) => x.EstadoEmissor).Column("rguf");
+ base.Map((ClienteDb x) => (object)x.Expedicao).Column("rgexpedica");
+ base.Map((ClienteDb x) => x.Habilitacao).Column("numehabili");
+ base.Map((ClienteDb x) => (object)x.PrimeiraHabilitacao).Column("primehabil");
+ base.Map((ClienteDb x) => (object)x.VencimentoHabilitacao).Column("venchabili");
+ base.Map((ClienteDb x) => x.CategoriaHabilitacao).Column("cathabili");
+ base.Map((ClienteDb x) => x.Cei).Column("cei");
+ base.Map((ClienteDb x) => x.Pasta).Column("pasta");
+ base.Map((ClienteDb x) => x.Agencia).Column("agencia");
+ base.Map((ClienteDb x) => x.TipoConta).Column("tipoconta");
+ base.Map((ClienteDb x) => x.Conta).Column("conta");
+ base.Map((ClienteDb x) => (object)x.ClienteDesde).Column("clidesde");
+ base.Map((ClienteDb x) => x.Observacao).Column("anotacoes").CustomType("StringClob").CustomSqlType("varchar(MAX)");
+ base.Map((ClienteDb x) => (object)x.Excluido).Column("excluido").CustomType<CustomBoolType>();
+ base.Map((ClienteDb x) => (object)x.DocumentoPrincipal).CustomType<TipoDocumento>().Column("documentoprincipal");
+ base.Map((ClienteDb x) => x.Rne).Column("rne");
+ base.Map((ClienteDb x) => (object)x.Falecido).Column("Falecido");
+ base.Map((ClienteDb x) => (object)x.RendaMensal).Column("RendaMensal");
+ base.Map((ClienteDb x) => x.Caepf).Column("caepf");
+ base.Map((ClienteDb x) => (object)x.MalaDireta).Default("1");
+ base.Map((ClienteDb c) => (object)c.EstaNaCentralSegurado);
+ base.Map((ClienteDb x) => x.NomeSocialRg).Column("nomesocialRg");
+ }
+ }
+}
\ No newline at end of file |