summaryrefslogtreecommitdiff
path: root/Codemerx/Gestor.Infrastructure/Gestor.Infrastructure.Mappings.Seguros/ConsorcioMap.cs
blob: a443f1d19a773cc355be7c70521e25b1abc79b52 (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
using FluentNHibernate.Mapping;
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 ConsorcioMap : ClassMap<ConsorcioDb>
	{
		public ConsorcioMap()
		{
			base.Table("consorcio");
			base.LazyLoad();
			base.Id((ConsorcioDb x) => (object)x.Id).GeneratedBy.Identity().Column("idconsorcio");
			base.References<ItemDb>((ConsorcioDb x) => x.Item).Column("iditem").Not.Nullable().Fetch.Join();
			base.Map((ConsorcioDb x) => x.BensConsorcio).Column("bensconsorcio");
			base.Map((ConsorcioDb x) => (object)x.ValorCredito).Column("valorcredito");
			base.Map((ConsorcioDb x) => x.Grupo).Column("grupo");
			base.Map((ConsorcioDb x) => x.Cota).Column("cota");
			base.Map((ConsorcioDb x) => x.Observacao).Column("obs").CustomType("StringClob").CustomSqlType("varchar(MAX)");
		}
	}
}