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 PerfilMap : ClassMap { public PerfilMap() { base.Table("perfil"); base.LazyLoad(); base.Id((PerfilDb x) => (object)x.Id).GeneratedBy.Identity().Column("idperfil"); base.References((PerfilDb x) => x.Cliente).Column("idcliente").Not.Nullable().Fetch.Join(); base.References((PerfilDb x) => x.Controle).Column("idcontrole").Not.Nullable().Fetch.Join(); base.Map((PerfilDb x) => x.Nome).Column("nomecompleto").Not.Nullable(); base.Map((PerfilDb x) => (object)x.Relacao).CustomType>().Column("relacao"); base.Map((PerfilDb x) => x.CepPernoite).Column("ceppernoite"); base.Map((PerfilDb x) => x.CepCirculacao).Column("cepcirculacao"); base.Map((PerfilDb x) => x.KmMensal).Column("quilometragemmensal"); base.Map((PerfilDb x) => (object)x.UsoProfissional).Column("usoprofissional").CustomType(); base.Map((PerfilDb x) => (object)x.GaragemTrabalho).CustomType>().Column("garagemtrabalho"); base.Map((PerfilDb x) => (object)x.GaragemEstudo).CustomType>().Column("garagemestudo"); base.Map((PerfilDb x) => (object)x.GaragemResidencia).CustomType>().Column("garagemresidencia"); base.Map((PerfilDb x) => (object)x.VeiculoResidencia).CustomType().Column("veiculosresidencia"); base.Map((PerfilDb x) => (object)x.TipoResidencia).CustomType>().Column("tiporesidencia"); base.Map((PerfilDb x) => (object)x.UsoDependentes).CustomType>().Column("usodependentes"); base.Map((PerfilDb x) => (object)x.DistanciaResidenciaTrabalho).CustomType>().Column("distanciaresidenciatrabalho"); base.Map((PerfilDb x) => (object)x.Ocupacao).CustomType>().Column("ocupacao"); base.Map((PerfilDb x) => x.Cpf).Column("cpf"); base.Map((PerfilDb x) => (object)x.Nascimento).Column("datanascimento"); base.Map((PerfilDb x) => (object)x.Sexo).CustomType>().Column("sexo"); base.Map((PerfilDb x) => (object)x.TempoHabilitacao).CustomType>().Column("tempohabilitacao"); base.Map((PerfilDb x) => (object)x.EstadoCivil).CustomType>().Column("estadocivil"); base.Map((PerfilDb x) => x.Habilitacao).Column("numerohabilitacao"); base.Map((PerfilDb x) => (object)x.Isencao).Column("isencao").CustomType(); base.Map((PerfilDb x) => (object)x.SeguroVida).Column("SeguroVida").CustomType(); base.Map((PerfilDb x) => (object)x.AntiFurto).CustomType>().Column("antifurto"); base.Map((PerfilDb x) => (object)x.EstenderCobertura).Column("EstenderCobertura"); } } }