summaryrefslogtreecommitdiff
path: root/Gestor.Infrastructure/Gestor.Infrastructure.Mappings.Financeiro/BancosContasMap.cs
blob: c04a524bdf1ab362f8a531269fcf250e383ef873 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
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>();
		}
	}
}