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 --- .../DocumentoMap.cs | 70 ++++++++++++++++++++++ 1 file changed, 70 insertions(+) create mode 100644 Codemerx/Gestor.Infrastructure/Gestor.Infrastructure.Mappings.Seguros/DocumentoMap.cs (limited to 'Codemerx/Gestor.Infrastructure/Gestor.Infrastructure.Mappings.Seguros/DocumentoMap.cs') diff --git a/Codemerx/Gestor.Infrastructure/Gestor.Infrastructure.Mappings.Seguros/DocumentoMap.cs b/Codemerx/Gestor.Infrastructure/Gestor.Infrastructure.Mappings.Seguros/DocumentoMap.cs new file mode 100644 index 0000000..bbb4721 --- /dev/null +++ b/Codemerx/Gestor.Infrastructure/Gestor.Infrastructure.Mappings.Seguros/DocumentoMap.cs @@ -0,0 +1,70 @@ +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 DocumentoMap : ClassMap + { + public DocumentoMap() + { + base.Table("documento"); + base.LazyLoad(); + base.Id((DocumentoDb x) => (object)x.Id).GeneratedBy.Identity().Column("iddocumento"); + base.References((DocumentoDb x) => x.Controle).Column("idcontrole").Not.Nullable().Fetch.Join(); + base.References((DocumentoDb x) => x.UsuarioCriacao).Column("usuariocriacao"); + base.References((DocumentoDb x) => x.Status).Column("idstatus").Fetch.Join(); + base.Map((DocumentoDb x) => (object)x.DataCriacao).Column("cri_data"); + base.Map((DocumentoDb x) => (object)x.Ordem).Column("ordem").Not.Nullable(); + base.Map((DocumentoDb x) => (object)x.Tipo).Column("tipo").Not.Nullable(); + base.Map((DocumentoDb x) => x.Proposta).Column("proposta"); + base.Map((DocumentoDb x) => x.PropostaEndosso).Column("pedadit"); + base.Map((DocumentoDb x) => x.ApoliceAnterior).Column("apol_antes"); + base.Map((DocumentoDb x) => x.Apolice).Column("contrato"); + base.Map((DocumentoDb x) => x.Endosso).Column("aditamento"); + base.Map((DocumentoDb x) => (object)x.DataControle).Column("datacontrole"); + base.Map((DocumentoDb x) => (object)x.Excluido).Column("excluido").Not.Nullable().CustomType(); + base.Map((DocumentoDb x) => (object)x.PropostaAssinada).Column("propassinada").CustomType(); + base.Map((DocumentoDb x) => (object)x.ApoliceConferida).Column("apoconferida").CustomType(); + base.Map((DocumentoDb x) => (object)x.AdicionalComiss).Column("adinacomis").CustomType(); + base.Map((DocumentoDb x) => (object)x.Comissao).Column("com01"); + base.Map((DocumentoDb x) => (object)x.PremioLiquido).Column("pr_liq"); + base.Map((DocumentoDb x) => (object)x.PremioAdicional).Column("pr_adic"); + base.Map((DocumentoDb x) => (object)x.PremioTotal).Column("pr_total"); + base.Map((DocumentoDb x) => (object)x.NumeroParcelas).Column("n_parc"); + base.Map((DocumentoDb x) => (object)x.Custo).Column("pr_custo"); + base.Map((DocumentoDb x) => (object)x.Iof).Column("pr_iof"); + base.Map((DocumentoDb x) => (object)x.Diferenca).Column("diferenca"); + base.Map((DocumentoDb x) => (object)x.Negocio).CustomType().Column("idnegocio"); + base.Map((DocumentoDb x) => x.Observacao).Column("obs").CustomType("StringClob").CustomSqlType("varchar(MAX)"); + base.Map((DocumentoDb x) => x.Pasta).Column("pasta"); + base.Map((DocumentoDb x) => x.Agencia).Column("agencia"); + base.Map((DocumentoDb x) => x.Conta).Column("conta"); + base.Map((DocumentoDb x) => (object)x.TipoEndosso).CustomType>().Column("tipoadit"); + base.Map((DocumentoDb x) => (object)x.TipoRecebimento).CustomType().Column("tiporecebimento"); + base.Map((DocumentoDb x) => (object)x.Situacao).CustomType().Column("situacao").Not.Nullable(); + base.Map((DocumentoDb x) => (object)x.SituacaoAnterior).CustomType>().Column("situant"); + base.Map((DocumentoDb x) => x.NumeroCartao).Column("numerocart"); + base.Map((DocumentoDb x) => x.VencimentoCartao).Column("vencimentocart"); + base.Map((DocumentoDb x) => x.NomeProponente).Column("nomeprop"); + base.Map((DocumentoDb x) => (object)x.Vigencia1).Column("vigencia1").Not.Nullable(); + base.Map((DocumentoDb x) => (object)x.Vigencia2).Column("vigencia2"); + base.Map((DocumentoDb x) => (object)x.Emissao).Column("emissao"); + base.Map((DocumentoDb x) => (object)x.Remessa).Column("remessa"); + base.Map((DocumentoDb x) => (object)x.ComissaoTotal).Column("comissaototal"); + base.Map((DocumentoDb x) => (object)x.NegocioCorretora).CustomType().Column("NegocioCorretora"); + base.Map((DocumentoDb x) => (object)x.Bandeira).CustomType().Column("idbandeira"); + base.References((DocumentoDb x) => x.Banco).Column("idbanco").Cascade.None(); + base.References((DocumentoDb x) => x.Estipulante1).Column("idestipulante").Fetch.Join(); + base.References((DocumentoDb x) => x.Estipulante2).Column("idestipulante2").Fetch.Join(); + base.References((DocumentoDb x) => x.Estipulante3).Column("idestipulante3").Fetch.Join(); + base.References((DocumentoDb x) => x.Estipulante4).Column("idestipulante4").Fetch.Join(); + base.References((DocumentoDb x) => x.Estipulante5).Column("idestipulante5").Fetch.Join(); + base.Map((DocumentoDb x) => (object)x.FormaPagamento).CustomType>().Column("formapagamento"); + } + } +} \ No newline at end of file -- cgit v1.2.3