blob: e42335194e251adc469d834a6404f389e05c0190 (
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
28
29
30
31
32
33
34
|
using FluentNHibernate.Mapping;
using Gestor.Infrastructure.Entities.Common;
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 VendedorMap : ClassMap<VendedorDb>
{
public VendedorMap()
{
base.Table("vendedor");
base.LazyLoad();
base.Id((VendedorDb x) => (object)x.Id).GeneratedBy.Identity().Column("idvendedor");
base.References<BancoDb>((VendedorDb x) => x.Banco).Column("idcodigobanco").Fetch.Join();
base.Map((VendedorDb x) => (object)x.IdEmpresa).Column("idempresa");
base.Map((VendedorDb x) => x.Nome).Column("nome");
base.Map((VendedorDb x) => (object)x.TipoIncidenciaDesconto).Column("tipoincidenciadesconto").Default("0");
base.Map((VendedorDb x) => (object)x.Desconto).Column("desconto");
base.Map((VendedorDb x) => x.Documento).Column("cpfcnpj");
base.Map((VendedorDb x) => x.Conta).Column("conta");
base.Map((VendedorDb x) => x.Agencia).Column("agencia");
base.Map((VendedorDb x) => (object)x.TipoConta).Column("idtipoconta");
base.Map((VendedorDb x) => x.TitularConta).Column("titularconta");
base.Map((VendedorDb x) => x.TitularDocumento).Column("cpfcnpjtitular");
base.Map((VendedorDb x) => (object)x.Corretora).Column("corretora").CustomType<CustomBoolType>();
base.Map((VendedorDb x) => (object)x.Ativo).Column("ativo").CustomType<CustomBoolType>();
base.Map((VendedorDb x) => x.Observacao).Column("obs").CustomType("StringClob").CustomSqlType("varchar(MAX)");
}
}
}
|