summaryrefslogtreecommitdiff
path: root/Gestor.Infrastructure/Gestor.Infrastructure.Mappings.Financeiro/LancamentoMap.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Gestor.Infrastructure/Gestor.Infrastructure.Mappings.Financeiro/LancamentoMap.cs')
-rw-r--r--Gestor.Infrastructure/Gestor.Infrastructure.Mappings.Financeiro/LancamentoMap.cs36
1 files changed, 36 insertions, 0 deletions
diff --git a/Gestor.Infrastructure/Gestor.Infrastructure.Mappings.Financeiro/LancamentoMap.cs b/Gestor.Infrastructure/Gestor.Infrastructure.Mappings.Financeiro/LancamentoMap.cs
new file mode 100644
index 0000000..baf3ce7
--- /dev/null
+++ b/Gestor.Infrastructure/Gestor.Infrastructure.Mappings.Financeiro/LancamentoMap.cs
@@ -0,0 +1,36 @@
+using FluentNHibernate.Mapping;
+using Gestor.Infrastructure.Entities.Financeiro;
+using Gestor.Infrastructure.Entities.Generic;
+using System;
+using System.Linq.Expressions;
+using System.Runtime.CompilerServices;
+
+namespace Gestor.Infrastructure.Mappings.Financeiro
+{
+ public class LancamentoMap : ClassMap<LancamentoDb>
+ {
+ public LancamentoMap()
+ {
+ base.Table("lancamen");
+ base.LazyLoad();
+ base.Id((LancamentoDb x) => (object)x.Id).GeneratedBy.Identity().Column("idlancamen");
+ base.References<ControleFinanceiroDb>((LancamentoDb x) => x.Controle).Column("idcfinan").Fetch.Join();
+ base.References<BancosContasDb>((LancamentoDb x) => x.Conta).Column("idconta").Fetch.Join();
+ base.Map((LancamentoDb x) => (object)x.TipoPagamento).CustomType<CustomEnumType<TipoPagamento>>().Column("idtipopagto");
+ base.Map((LancamentoDb x) => x.Historico).Column("historico");
+ base.Map((LancamentoDb x) => x.Documento).Column("documento");
+ base.Map((LancamentoDb x) => x.Complemento).Column("complemento");
+ base.Map((LancamentoDb x) => x.Competencia).Column("competencia");
+ base.Map((LancamentoDb x) => (object)x.Parcela).Column("parcela");
+ base.Map((LancamentoDb x) => (object)x.Valor).Column("vlrpre");
+ base.Map((LancamentoDb x) => (object)x.Vencimento).Column("dtpre");
+ base.Map((LancamentoDb x) => (object)x.Baixa).Column("dtbaixa");
+ base.Map((LancamentoDb x) => (object)x.ValorPago).Column("vlrbaixa");
+ base.Map((LancamentoDb x) => (object)x.Pagamento).Column("dtpagto");
+ base.Map((LancamentoDb x) => (object)x.Sinal).CustomType<CustomEnumType<Sinal>>().Column("sinal");
+ base.Map((LancamentoDb x) => x.Observacao).Column("obs").CustomType("StringClob").CustomSqlType("varchar(MAX)");
+ base.Map((LancamentoDb x) => x.CodigoBanco);
+ base.Map((LancamentoDb x) => (object)x.DataLancamento).Column("datacriacao");
+ }
+ }
+} \ No newline at end of file