summaryrefslogtreecommitdiff
path: root/Gestor.Infrastructure/Gestor.Infrastructure.Mappings.Financeiro/BancosContasMap.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Gestor.Infrastructure/Gestor.Infrastructure.Mappings.Financeiro/BancosContasMap.cs')
-rw-r--r--Gestor.Infrastructure/Gestor.Infrastructure.Mappings.Financeiro/BancosContasMap.cs27
1 files changed, 27 insertions, 0 deletions
diff --git a/Gestor.Infrastructure/Gestor.Infrastructure.Mappings.Financeiro/BancosContasMap.cs b/Gestor.Infrastructure/Gestor.Infrastructure.Mappings.Financeiro/BancosContasMap.cs
new file mode 100644
index 0000000..c04a524
--- /dev/null
+++ b/Gestor.Infrastructure/Gestor.Infrastructure.Mappings.Financeiro/BancosContasMap.cs
@@ -0,0 +1,27 @@
+using FluentNHibernate.Mapping;
+using Gestor.Infrastructure.Entities.Common;
+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 BancosContasMap : ClassMap<BancosContasDb>
+ {
+ public BancosContasMap()
+ {
+ base.Table("conta");
+ base.LazyLoad();
+ base.Id((BancosContasDb x) => (object)x.Id).GeneratedBy.Identity().Column("idconta");
+ base.References<BancoDb>((BancosContasDb x) => x.Banco).Column("idcodigobanco").Fetch.Join();
+ base.Map((BancosContasDb x) => (object)x.IdEmpresa).Column("idempresa");
+ base.Map((BancosContasDb x) => x.Descricao).Column("descricao");
+ base.Map((BancosContasDb x) => x.Agencia).Column("agencia");
+ base.Map((BancosContasDb x) => x.Conta).Column("conta");
+ base.Map((BancosContasDb x) => x.Observacao).Column("obs").CustomType("StringClob").CustomSqlType("varchar(MAX)");
+ base.Map((BancosContasDb x) => (object)x.Ativo).Column("ativo").CustomType<CustomBoolType>();
+ }
+ }
+} \ No newline at end of file