blob: 53d2e0c6492d33d43a1d4e096f7667fd10eb976d (
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
|
using FluentNHibernate.Mapping;
using Gestor.Infrastructure.Entities.Common;
using Gestor.Infrastructure.Entities.Generic;
using System;
using System.Linq.Expressions;
using System.Runtime.CompilerServices;
namespace Gestor.Infrastructure.Mappings.Common
{
public class EmpresaMap : ClassMap<EmpresaDb>
{
public EmpresaMap()
{
base.Table("empresa");
base.LazyLoad();
base.Id((EmpresaDb x) => (object)x.Id).GeneratedBy.Identity().Column("idempresa");
base.Map((EmpresaDb x) => x.Nome).Column("nome").Not.Nullable();
base.Map((EmpresaDb x) => x.NomeSocial);
base.Map((EmpresaDb x) => x.Documento).Column("cgccpf");
base.Map((EmpresaDb x) => x.Serial).Column("ns");
base.Map((EmpresaDb x) => x.Cep).Column("cep");
base.Map((EmpresaDb x) => x.Endereco).Column("endereco");
base.Map((EmpresaDb x) => x.Numero).Column("numero");
base.Map((EmpresaDb x) => x.Complemento).Column("complemento");
base.Map((EmpresaDb x) => x.Bairro).Column("bairro");
base.Map((EmpresaDb x) => x.Cidade).Column("cidade");
base.Map((EmpresaDb x) => x.Estado).Column("uf");
base.Map((EmpresaDb x) => x.Site).Column("site");
base.Map((EmpresaDb x) => x.Email).Column("email");
base.Map((EmpresaDb x) => (object)x.TipoTelefone1).CustomType<TipoTelefone?>();
base.Map((EmpresaDb x) => x.PrimeiroPrefixo).Column("ddd");
base.Map((EmpresaDb x) => x.PrimeiroTelefone).Column("telefone");
base.Map((EmpresaDb x) => (object)x.TipoTelefone2).CustomType<TipoTelefone?>();
base.Map((EmpresaDb x) => x.SegundoPrefixo).Column("ddd2");
base.Map((EmpresaDb x) => x.SegundoTelefone).Column("telefone2");
base.Map((EmpresaDb x) => (object)x.QuantidadeFuncionarios).Column("nfuncionarios");
base.Map((EmpresaDb x) => x.QuantidadeFiliais).Column("unidade");
base.Map((EmpresaDb x) => x.Responsavel).Column("nomeresponsavel");
base.Map((EmpresaDb x) => x.EmailResponsavel).Column("emailresponsavel");
base.Map((EmpresaDb x) => x.SenhaAdmin).Column("senhaadm");
base.Map((EmpresaDb x) => x.Facebook);
base.Map((EmpresaDb x) => x.Instagram);
base.Map((EmpresaDb x) => x.Linkdin);
base.Map((EmpresaDb x) => x.Whatsapp);
base.Map((EmpresaDb x) => x.WhatsappSinistro);
base.Map((EmpresaDb x) => x.Twitter);
base.Map((EmpresaDb x) => x.Localizacao);
base.Map((EmpresaDb x) => x.Logo).CustomSqlType("varbinary(max)").Length(2147483647);
base.Map((EmpresaDb x) => x.LogoId);
base.Map((EmpresaDb x) => (object)x.MaxFileSize).Column("filesize");
}
}
}
|