summaryrefslogtreecommitdiff
path: root/Gestor.Infrastructure/Gestor.Infrastructure.Mappings.Financeiro/ControleFinanceiroMap.cs
blob: e5e420cd9922211a1b907f324acadc06e87db19b (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
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 ControleFinanceiroMap : ClassMap<ControleFinanceiroDb>
	{
		public ControleFinanceiroMap()
		{
			base.Table("cfinan");
			base.LazyLoad();
			base.Id((ControleFinanceiroDb x) => (object)x.Id).GeneratedBy.Identity().Column("idcfinan");
			base.References<FornecedorDb>((ControleFinanceiroDb x) => x.Fornecedor).Column("idfornecedor").NotFound.Ignore().Fetch.Join();
			base.References<PlanosDb>((ControleFinanceiroDb x) => x.Plano).Column("idcplanos").NotFound.Ignore().Fetch.Join();
			base.References<CentroDb>((ControleFinanceiroDb x) => x.Centro).Column("idcentro").NotFound.Ignore().Fetch.Join();
			base.Map((ControleFinanceiroDb x) => x.Historico).Column("historico");
			base.Map((ControleFinanceiroDb x) => (object)x.Parcelas).Column("parcela");
		}
	}
}