diff options
Diffstat (limited to 'Gestor.Infrastructure/Gestor.Infrastructure.Mappings.Ferramentas')
17 files changed, 446 insertions, 0 deletions
diff --git a/Gestor.Infrastructure/Gestor.Infrastructure.Mappings.Ferramentas/AgendaEmailMap.cs b/Gestor.Infrastructure/Gestor.Infrastructure.Mappings.Ferramentas/AgendaEmailMap.cs new file mode 100644 index 0000000..67624d1 --- /dev/null +++ b/Gestor.Infrastructure/Gestor.Infrastructure.Mappings.Ferramentas/AgendaEmailMap.cs @@ -0,0 +1,21 @@ +using FluentNHibernate.Mapping;
+using Gestor.Infrastructure.Entities.Ferramentas;
+using Gestor.Infrastructure.Entities.Generic;
+using System;
+using System.Linq.Expressions;
+using System.Runtime.CompilerServices;
+
+namespace Gestor.Infrastructure.Mappings.Ferramentas
+{
+ public class AgendaEmailMap : ClassMap<AgendaEmailDb>
+ {
+ public AgendaEmailMap()
+ {
+ base.Table("agendaemail");
+ base.LazyLoad();
+ base.Id((AgendaEmailDb x) => (object)x.Id).GeneratedBy.Identity().Column("idagendaemail");
+ base.References<AgendaDb>((AgendaEmailDb x) => x.Agenda).Column("idagenda").Not.Nullable().Fetch.Join();
+ base.Map((AgendaEmailDb x) => x.Email).Column("email").Not.Nullable();
+ }
+ }
+}
\ No newline at end of file diff --git a/Gestor.Infrastructure/Gestor.Infrastructure.Mappings.Ferramentas/AgendaMap.cs b/Gestor.Infrastructure/Gestor.Infrastructure.Mappings.Ferramentas/AgendaMap.cs new file mode 100644 index 0000000..e70b806 --- /dev/null +++ b/Gestor.Infrastructure/Gestor.Infrastructure.Mappings.Ferramentas/AgendaMap.cs @@ -0,0 +1,28 @@ +using FluentNHibernate.Mapping;
+using Gestor.Infrastructure.Entities.Ferramentas;
+using Gestor.Infrastructure.Entities.Generic;
+using System;
+using System.Linq.Expressions;
+using System.Runtime.CompilerServices;
+
+namespace Gestor.Infrastructure.Mappings.Ferramentas
+{
+ public class AgendaMap : ClassMap<AgendaDb>
+ {
+ public AgendaMap()
+ {
+ base.Table("agenda");
+ base.LazyLoad();
+ base.Id((AgendaDb x) => (object)x.Id).GeneratedBy.Identity().Column("idagenda");
+ base.Map((AgendaDb x) => x.Nome).Column("nome").Not.Nullable();
+ base.Map((AgendaDb x) => x.Endereco).Column("endereco");
+ base.Map((AgendaDb x) => x.Cep).Column("cep");
+ base.Map((AgendaDb x) => x.Numero).Column("numero");
+ base.Map((AgendaDb x) => x.Complemento).Column("complemento");
+ base.Map((AgendaDb x) => x.Bairro).Column("bairro");
+ base.Map((AgendaDb x) => x.Cidade).Column("cidade");
+ base.Map((AgendaDb x) => x.Estado).Column("estado");
+ base.Map((AgendaDb x) => x.Observacao).Column("observacao").CustomType("StringClob").CustomSqlType("varchar(MAX)");
+ }
+ }
+}
\ No newline at end of file diff --git a/Gestor.Infrastructure/Gestor.Infrastructure.Mappings.Ferramentas/AgendaTelefoneMap.cs b/Gestor.Infrastructure/Gestor.Infrastructure.Mappings.Ferramentas/AgendaTelefoneMap.cs new file mode 100644 index 0000000..a08d55e --- /dev/null +++ b/Gestor.Infrastructure/Gestor.Infrastructure.Mappings.Ferramentas/AgendaTelefoneMap.cs @@ -0,0 +1,24 @@ +using FluentNHibernate.Mapping;
+using Gestor.Infrastructure.Entities.Ferramentas;
+using Gestor.Infrastructure.Entities.Generic;
+using System;
+using System.Linq.Expressions;
+using System.Runtime.CompilerServices;
+
+namespace Gestor.Infrastructure.Mappings.Ferramentas
+{
+ public class AgendaTelefoneMap : ClassMap<AgendaTelefoneDb>
+ {
+ public AgendaTelefoneMap()
+ {
+ base.Table("agendatelefone");
+ base.LazyLoad();
+ base.Id((AgendaTelefoneDb x) => (object)x.Id).GeneratedBy.Identity().Column("idagendatelefone");
+ base.References<AgendaDb>((AgendaTelefoneDb x) => x.Agenda).Column("idagenda").Not.Nullable().Fetch.Join();
+ base.Map((AgendaTelefoneDb x) => (object)x.Tipo).CustomType<TipoTelefone>().Column("tipo");
+ base.Map((AgendaTelefoneDb x) => x.Prefixo).Column("ddd");
+ base.Map((AgendaTelefoneDb x) => x.Numero).Column("fone").Not.Nullable();
+ base.Map((AgendaTelefoneDb x) => x.Observacao).Column("observacao").CustomType("StringClob").CustomSqlType("varchar(MAX)");
+ }
+ }
+}
\ No newline at end of file diff --git a/Gestor.Infrastructure/Gestor.Infrastructure.Mappings.Ferramentas/CategoriaTarefaMap.cs b/Gestor.Infrastructure/Gestor.Infrastructure.Mappings.Ferramentas/CategoriaTarefaMap.cs new file mode 100644 index 0000000..b0cd7d1 --- /dev/null +++ b/Gestor.Infrastructure/Gestor.Infrastructure.Mappings.Ferramentas/CategoriaTarefaMap.cs @@ -0,0 +1,20 @@ +using FluentNHibernate.Mapping;
+using Gestor.Infrastructure.Entities.Ferramentas;
+using Gestor.Infrastructure.Entities.Generic;
+using System;
+using System.Linq.Expressions;
+using System.Runtime.CompilerServices;
+
+namespace Gestor.Infrastructure.Mappings.Ferramentas
+{
+ public class CategoriaTarefaMap : ClassMap<CategoriaTarefaDb>
+ {
+ public CategoriaTarefaMap()
+ {
+ base.Table("CategoriaTarefa");
+ base.LazyLoad();
+ base.Id((CategoriaTarefaDb x) => (object)x.Id).GeneratedBy.Identity();
+ base.Map((CategoriaTarefaDb x) => x.Descricao);
+ }
+ }
+}
\ No newline at end of file diff --git a/Gestor.Infrastructure/Gestor.Infrastructure.Mappings.Ferramentas/CredencialMap.cs b/Gestor.Infrastructure/Gestor.Infrastructure.Mappings.Ferramentas/CredencialMap.cs new file mode 100644 index 0000000..d7cff32 --- /dev/null +++ b/Gestor.Infrastructure/Gestor.Infrastructure.Mappings.Ferramentas/CredencialMap.cs @@ -0,0 +1,34 @@ +using FluentNHibernate.Mapping;
+using Gestor.Infrastructure.Entities.Ferramentas;
+using Gestor.Infrastructure.Entities.Generic;
+using System;
+using System.Linq.Expressions;
+using System.Runtime.CompilerServices;
+
+namespace Gestor.Infrastructure.Mappings.Ferramentas
+{
+ public class CredencialMap : ClassMap<CredencialDb>
+ {
+ public CredencialMap()
+ {
+ base.Table("enviosmtp");
+ base.LazyLoad();
+ base.Id((CredencialDb x) => (object)x.Id).GeneratedBy.Identity().Column("idenviosmtp");
+ base.Map((CredencialDb x) => (object)x.IdEmpresa).Column("idempresa").Not.Nullable();
+ base.Map((CredencialDb x) => (object)x.IdUsuario).Column("idusuario").Not.Nullable();
+ base.Map((CredencialDb x) => x.Header);
+ base.Map((CredencialDb x) => (object)x.Tipo).CustomType<TipoEmail>();
+ base.Map((CredencialDb x) => x.Descricao).Column("nome");
+ base.Map((CredencialDb x) => x.Email).Column("email");
+ base.Map((CredencialDb x) => x.Dominio).Column("server");
+ base.Map((CredencialDb x) => (object)x.Porta).Column("port");
+ base.Map((CredencialDb x) => x.Usuario).Column("credential");
+ base.Map((CredencialDb x) => x.Senha).Column("senha");
+ base.Map((CredencialDb x) => (object)x.Seguro).Column("ssl").CustomType<CustomBoolType>();
+ base.Map((CredencialDb x) => x.Cabecalho).Column("cabecalho").Length(4001);
+ base.Map((CredencialDb x) => x.Assinatura).Column("assinatura").Length(4001);
+ base.Map((CredencialDb x) => x.Replyto);
+ base.Map((CredencialDb x) => (object)x.Excluido);
+ }
+ }
+}
\ No newline at end of file diff --git a/Gestor.Infrastructure/Gestor.Infrastructure.Mappings.Ferramentas/FaseMap.cs b/Gestor.Infrastructure/Gestor.Infrastructure.Mappings.Ferramentas/FaseMap.cs new file mode 100644 index 0000000..4be2384 --- /dev/null +++ b/Gestor.Infrastructure/Gestor.Infrastructure.Mappings.Ferramentas/FaseMap.cs @@ -0,0 +1,23 @@ +using FluentNHibernate.Mapping;
+using Gestor.Infrastructure.Entities.Ferramentas;
+using Gestor.Infrastructure.Entities.Generic;
+using System;
+using System.Linq.Expressions;
+using System.Runtime.CompilerServices;
+
+namespace Gestor.Infrastructure.Mappings.Ferramentas
+{
+ public class FaseMap : ClassMap<FaseDb>
+ {
+ public FaseMap()
+ {
+ base.Table("Fase");
+ base.LazyLoad();
+ base.Id((FaseDb x) => (object)x.Id).GeneratedBy.Identity();
+ base.References<TrilhaDb>((FaseDb x) => x.Trilha).Column("IdTrilha").Not.Nullable();
+ base.Map((FaseDb x) => x.Titulo);
+ base.Map((FaseDb x) => x.Descricao);
+ base.Map((FaseDb x) => (object)x.Expiracao);
+ }
+ }
+}
\ No newline at end of file diff --git a/Gestor.Infrastructure/Gestor.Infrastructure.Mappings.Ferramentas/ImpostoMap.cs b/Gestor.Infrastructure/Gestor.Infrastructure.Mappings.Ferramentas/ImpostoMap.cs new file mode 100644 index 0000000..4cce11b --- /dev/null +++ b/Gestor.Infrastructure/Gestor.Infrastructure.Mappings.Ferramentas/ImpostoMap.cs @@ -0,0 +1,27 @@ +using FluentNHibernate.Mapping;
+using Gestor.Infrastructure.Entities.Ferramentas;
+using Gestor.Infrastructure.Entities.Generic;
+using Gestor.Infrastructure.Entities.Seguros;
+using System;
+using System.Linq.Expressions;
+using System.Runtime.CompilerServices;
+
+namespace Gestor.Infrastructure.Mappings.Ferramentas
+{
+ public class ImpostoMap : ClassMap<ImpostoDb>
+ {
+ public ImpostoMap()
+ {
+ base.Table("Imposto");
+ base.LazyLoad();
+ base.Id((ImpostoDb x) => (object)x.Id).GeneratedBy.Identity();
+ base.References<SeguradoraDb>((ImpostoDb x) => x.Seguradora).Column("idciaseg").NotFound.Ignore().Fetch.Join();
+ base.References<RamoDb>((ImpostoDb x) => x.Ramo).Column("idramo").NotFound.Ignore().Fetch.Join();
+ base.Map((ImpostoDb x) => (object)x.Ir).Not.Nullable();
+ base.Map((ImpostoDb x) => (object)x.Iss).Not.Nullable();
+ base.Map((ImpostoDb x) => (object)x.Outros).Not.Nullable();
+ base.Map((ImpostoDb x) => (object)x.Desconto).Not.Nullable();
+ base.Map((ImpostoDb x) => (object)x.Ativo).Not.Nullable().Default("1");
+ }
+ }
+}
\ No newline at end of file diff --git a/Gestor.Infrastructure/Gestor.Infrastructure.Mappings.Ferramentas/LogEmailMap.cs b/Gestor.Infrastructure/Gestor.Infrastructure.Mappings.Ferramentas/LogEmailMap.cs new file mode 100644 index 0000000..1bd1140 --- /dev/null +++ b/Gestor.Infrastructure/Gestor.Infrastructure.Mappings.Ferramentas/LogEmailMap.cs @@ -0,0 +1,34 @@ +using FluentNHibernate.Mapping;
+using Gestor.Infrastructure.Entities.Ferramentas;
+using Gestor.Infrastructure.Entities.Generic;
+using System;
+using System.Linq.Expressions;
+using System.Runtime.CompilerServices;
+
+namespace Gestor.Infrastructure.Mappings.Ferramentas
+{
+ public class LogEmailMap : ClassMap<LogEmailDb>
+ {
+ public LogEmailMap()
+ {
+ base.Table("LogEmail");
+ base.LazyLoad();
+ base.Id((LogEmailDb x) => (object)x.Id).GeneratedBy.Identity();
+ base.References<CredencialDb>((LogEmailDb x) => x.Credencial);
+ base.References<UsuarioDb>((LogEmailDb x) => x.Usuario);
+ base.Map((LogEmailDb x) => (object)x.Tela).CustomType<TipoTela>();
+ base.Map((LogEmailDb x) => (object)x.Data);
+ base.Map((LogEmailDb x) => x.Destinatarios).CustomType("StringClob").CustomSqlType("varchar(MAX)");
+ base.Map((LogEmailDb x) => x.Assunto).CustomType("StringClob").CustomSqlType("varchar(MAX)");
+ base.Map((LogEmailDb x) => (object)x.EntityId);
+ base.Map((LogEmailDb x) => x.Cco).CustomType("StringClob").CustomSqlType("varchar(MAX)");
+ base.Map((LogEmailDb x) => x.Corpo).CustomType("StringClob").CustomSqlType("varchar(MAX)");
+ base.Map((LogEmailDb x) => x.Anexos).CustomType("StringClob").CustomSqlType("varchar(MAX)");
+ base.Map((LogEmailDb x) => x.Versao);
+ base.Map((LogEmailDb x) => x.NomeMaquina);
+ base.Map((LogEmailDb x) => x.UsuarioMaquina);
+ base.Map((LogEmailDb x) => x.Ip);
+ base.Map((LogEmailDb x) => (object)x.Relatorio).CustomType<Relatorio>();
+ }
+ }
+}
\ No newline at end of file diff --git a/Gestor.Infrastructure/Gestor.Infrastructure.Mappings.Ferramentas/NotaFiscalMap.cs b/Gestor.Infrastructure/Gestor.Infrastructure.Mappings.Ferramentas/NotaFiscalMap.cs new file mode 100644 index 0000000..3782c71 --- /dev/null +++ b/Gestor.Infrastructure/Gestor.Infrastructure.Mappings.Ferramentas/NotaFiscalMap.cs @@ -0,0 +1,30 @@ +using FluentNHibernate.Mapping;
+using Gestor.Infrastructure.Entities.Ferramentas;
+using Gestor.Infrastructure.Entities.Generic;
+using Gestor.Infrastructure.Entities.Seguros;
+using System;
+using System.Linq.Expressions;
+using System.Runtime.CompilerServices;
+
+namespace Gestor.Infrastructure.Mappings.Ferramentas
+{
+ public class NotaFiscalMap : ClassMap<NotaFiscalDb>
+ {
+ public NotaFiscalMap()
+ {
+ base.Table("NotaFiscal");
+ base.LazyLoad();
+ base.References<SeguradoraDb>((NotaFiscalDb x) => x.Seguradora).Column("IdSeguradora");
+ base.References<EstipulanteDb>((NotaFiscalDb x) => x.Estipulante).Column("IdEstipulante").Fetch.Join().NotFound.Ignore();
+ base.Id((NotaFiscalDb x) => (object)x.Id).GeneratedBy.Identity();
+ base.Map((NotaFiscalDb x) => (object)x.IdExtrato);
+ base.Map((NotaFiscalDb x) => (object)x.Iss);
+ base.Map((NotaFiscalDb x) => (object)x.ValorLiquido);
+ base.Map((NotaFiscalDb x) => (object)x.ValorBruto);
+ base.Map((NotaFiscalDb x) => (object)x.Data);
+ base.Map((NotaFiscalDb x) => x.Obs).CustomSqlType("varchar(MAX)");
+ base.Map((NotaFiscalDb x) => x.Extrato).CustomSqlType("varchar(100)");
+ base.Map((NotaFiscalDb x) => (object)x.Ir);
+ }
+ }
+}
\ No newline at end of file diff --git a/Gestor.Infrastructure/Gestor.Infrastructure.Mappings.Ferramentas/OrigemClienteMap.cs b/Gestor.Infrastructure/Gestor.Infrastructure.Mappings.Ferramentas/OrigemClienteMap.cs new file mode 100644 index 0000000..8366f28 --- /dev/null +++ b/Gestor.Infrastructure/Gestor.Infrastructure.Mappings.Ferramentas/OrigemClienteMap.cs @@ -0,0 +1,23 @@ +using FluentNHibernate.Mapping;
+using Gestor.Infrastructure.Entities.Ferramentas;
+using Gestor.Infrastructure.Entities.Generic;
+using Gestor.Infrastructure.Entities.Seguros;
+using System;
+using System.Linq.Expressions;
+using System.Runtime.CompilerServices;
+
+namespace Gestor.Infrastructure.Mappings.Ferramentas
+{
+ internal class OrigemClienteMap : ClassMap<OrigemClienteDb>
+ {
+ public OrigemClienteMap()
+ {
+ base.Table("origemcliente");
+ base.LazyLoad();
+ base.Id((OrigemClienteDb x) => (object)x.Id).Column("idorigemcliente").GeneratedBy.Identity();
+ base.References<ClienteDb>((OrigemClienteDb x) => x.Cliente).Column("idcliente").Fetch.Join();
+ base.Map((OrigemClienteDb x) => (object)x.TipoOrigem).Column("idtipoorigemcli");
+ base.Map((OrigemClienteDb x) => x.Nome).Length(100);
+ }
+ }
+}
\ No newline at end of file diff --git a/Gestor.Infrastructure/Gestor.Infrastructure.Mappings.Ferramentas/ReciboMap.cs b/Gestor.Infrastructure/Gestor.Infrastructure.Mappings.Ferramentas/ReciboMap.cs new file mode 100644 index 0000000..36ded4b --- /dev/null +++ b/Gestor.Infrastructure/Gestor.Infrastructure.Mappings.Ferramentas/ReciboMap.cs @@ -0,0 +1,28 @@ +using FluentNHibernate.Mapping;
+using Gestor.Infrastructure.Entities.Ferramentas;
+using Gestor.Infrastructure.Entities.Generic;
+using System;
+using System.Linq.Expressions;
+using System.Runtime.CompilerServices;
+
+namespace Gestor.Infrastructure.Mappings.Ferramentas
+{
+ public class ReciboMap : ClassMap<ReciboDb>
+ {
+ public ReciboMap()
+ {
+ base.Table("recibo");
+ base.LazyLoad();
+ base.Id((ReciboDb x) => (object)x.Id).GeneratedBy.Identity().Column("idrecibo");
+ base.Map((ReciboDb x) => (object)x.Tipo).Column("IdTipoRecibo").CustomType<TipoRecibo?>();
+ base.Map((ReciboDb x) => (object)x.Pagamento).Column("idtipopagto").CustomType<TipoPagamento?>();
+ base.Map((ReciboDb x) => (object)x.Valor).Column("valor").Not.Nullable();
+ base.Map((ReciboDb x) => (object)x.DataRecibo).Column("datarecibo").Not.Nullable();
+ base.Map((ReciboDb x) => x.Pagante).Column("sacado");
+ base.Map((ReciboDb x) => x.DocumentoPagante).Column("cpfcnpj");
+ base.Map((ReciboDb x) => x.Recebedor).Column("recebedor");
+ base.Map((ReciboDb x) => x.DocumentoRecebedor).Column("cpfcnpjrecebedor");
+ base.Map((ReciboDb x) => x.Referente).Column("referente").Not.Nullable();
+ }
+ }
+}
\ No newline at end of file diff --git a/Gestor.Infrastructure/Gestor.Infrastructure.Mappings.Ferramentas/ResponsavelTarefaMap.cs b/Gestor.Infrastructure/Gestor.Infrastructure.Mappings.Ferramentas/ResponsavelTarefaMap.cs new file mode 100644 index 0000000..82d9578 --- /dev/null +++ b/Gestor.Infrastructure/Gestor.Infrastructure.Mappings.Ferramentas/ResponsavelTarefaMap.cs @@ -0,0 +1,22 @@ +using FluentNHibernate.Mapping;
+using Gestor.Infrastructure.Entities.Ferramentas;
+using Gestor.Infrastructure.Entities.Generic;
+using Gestor.Infrastructure.Entities.Seguros;
+using System;
+using System.Linq.Expressions;
+using System.Runtime.CompilerServices;
+
+namespace Gestor.Infrastructure.Mappings.Ferramentas
+{
+ public class ResponsavelTarefaMap : ClassMap<ResponsavelTarefaDb>
+ {
+ public ResponsavelTarefaMap()
+ {
+ base.Table("ResponsavelTarefa");
+ base.LazyLoad();
+ base.Id((ResponsavelTarefaDb x) => (object)x.Id).GeneratedBy.Identity();
+ base.References<UsuarioDb>((ResponsavelTarefaDb x) => x.Usuario).Not.Nullable().Fetch.Join();
+ base.Map((ResponsavelTarefaDb x) => (object)x.IdTarefa).Not.Nullable();
+ }
+ }
+}
\ No newline at end of file diff --git a/Gestor.Infrastructure/Gestor.Infrastructure.Mappings.Ferramentas/StatusProspeccaoMap.cs b/Gestor.Infrastructure/Gestor.Infrastructure.Mappings.Ferramentas/StatusProspeccaoMap.cs new file mode 100644 index 0000000..c11a811 --- /dev/null +++ b/Gestor.Infrastructure/Gestor.Infrastructure.Mappings.Ferramentas/StatusProspeccaoMap.cs @@ -0,0 +1,23 @@ +using FluentNHibernate.Mapping;
+using Gestor.Infrastructure.Entities.Ferramentas;
+using Gestor.Infrastructure.Entities.Generic;
+using System;
+using System.Linq.Expressions;
+using System.Runtime.CompilerServices;
+
+namespace Gestor.Infrastructure.Mappings.Ferramentas
+{
+ public class StatusProspeccaoMap : ClassMap<StatusDeProspeccaoDb>
+ {
+ public StatusProspeccaoMap()
+ {
+ base.Table("StatusProspeccao");
+ base.LazyLoad();
+ base.Id((StatusDeProspeccaoDb x) => (object)x.Id).GeneratedBy.Identity();
+ base.Map((StatusDeProspeccaoDb x) => x.Nome);
+ base.Map((StatusDeProspeccaoDb x) => x.Descricao).CustomType("StringClob").CustomSqlType("nvarchar(max)");
+ base.Map((StatusDeProspeccaoDb x) => (object)x.Ativo);
+ base.Map((StatusDeProspeccaoDb x) => (object)x.Excluido);
+ }
+ }
+}
\ No newline at end of file diff --git a/Gestor.Infrastructure/Gestor.Infrastructure.Mappings.Ferramentas/TarefaMap.cs b/Gestor.Infrastructure/Gestor.Infrastructure.Mappings.Ferramentas/TarefaMap.cs new file mode 100644 index 0000000..d4ebb97 --- /dev/null +++ b/Gestor.Infrastructure/Gestor.Infrastructure.Mappings.Ferramentas/TarefaMap.cs @@ -0,0 +1,38 @@ +using FluentNHibernate.Mapping;
+using Gestor.Infrastructure.Entities.Ferramentas;
+using Gestor.Infrastructure.Entities.Generic;
+using Gestor.Infrastructure.Entities.Seguros;
+using System;
+using System.Linq.Expressions;
+using System.Runtime.CompilerServices;
+
+namespace Gestor.Infrastructure.Mappings.Ferramentas
+{
+ public class TarefaMap : ClassMap<TarefaDb>
+ {
+ public TarefaMap()
+ {
+ base.Table("Tarefa");
+ base.LazyLoad();
+ base.Id((TarefaDb x) => (object)x.Id).GeneratedBy.Identity();
+ base.Map((TarefaDb x) => (object)x.IdCliente);
+ base.Map((TarefaDb x) => x.Cliente);
+ base.References<TrilhaDb>((TarefaDb x) => x.Trilha).Column("IdTrilha");
+ base.References<FaseDb>((TarefaDb x) => x.Fase).Column("IdFase");
+ base.References<UsuarioDb>((TarefaDb x) => x.Usuario).Column("IdUsuario");
+ base.References<UsuarioDb>((TarefaDb x) => x.UsuarioCadastro).Column("IdUsuarioCadastro");
+ base.References<CategoriaTarefaDb>((TarefaDb x) => x.Categoria).Column("IdCategoria").Fetch.Join();
+ base.References<TipoDeTarefaDb>((TarefaDb x) => x.TipoDeTarefa).Column("IdTipoTarefa");
+ base.Map((TarefaDb x) => (object)x.Entidade).CustomType<TipoTarefa>();
+ base.Map((TarefaDb x) => (object)x.IdEntidade);
+ base.Map((TarefaDb x) => x.Titulo);
+ base.Map((TarefaDb x) => x.Descricao).CustomType("StringClob").CustomSqlType("nvarchar(max)");
+ base.Map((TarefaDb x) => x.DescricaoInterna).Column("descricaointerna").CustomType("StringClob").CustomSqlType("nvarchar(max)");
+ base.Map((TarefaDb x) => x.Referencia);
+ base.Map((TarefaDb x) => (object)x.Agendamento);
+ base.Map((TarefaDb x) => (object)x.Conclusao);
+ base.Map((TarefaDb x) => (object)x.Status).CustomType<StatusTarefa>();
+ base.Map((TarefaDb x) => (object)x.Restrito);
+ }
+ }
+}
\ No newline at end of file diff --git a/Gestor.Infrastructure/Gestor.Infrastructure.Mappings.Ferramentas/TipoTarefaMap.cs b/Gestor.Infrastructure/Gestor.Infrastructure.Mappings.Ferramentas/TipoTarefaMap.cs new file mode 100644 index 0000000..19c52b0 --- /dev/null +++ b/Gestor.Infrastructure/Gestor.Infrastructure.Mappings.Ferramentas/TipoTarefaMap.cs @@ -0,0 +1,23 @@ +using FluentNHibernate.Mapping;
+using Gestor.Infrastructure.Entities.Ferramentas;
+using Gestor.Infrastructure.Entities.Generic;
+using System;
+using System.Linq.Expressions;
+using System.Runtime.CompilerServices;
+
+namespace Gestor.Infrastructure.Mappings.Ferramentas
+{
+ public class TipoTarefaMap : ClassMap<TipoDeTarefaDb>
+ {
+ public TipoTarefaMap()
+ {
+ base.Table("TipoTarefa");
+ base.LazyLoad();
+ base.Id((TipoDeTarefaDb x) => (object)x.Id).GeneratedBy.Identity();
+ base.Map((TipoDeTarefaDb x) => x.Nome);
+ base.Map((TipoDeTarefaDb x) => x.Descricao).CustomType("StringClob").CustomSqlType("nvarchar(max)");
+ base.Map((TipoDeTarefaDb x) => (object)x.Ativo);
+ base.Map((TipoDeTarefaDb x) => (object)x.Excluido);
+ }
+ }
+}
\ No newline at end of file diff --git a/Gestor.Infrastructure/Gestor.Infrastructure.Mappings.Ferramentas/TrilhaMap.cs b/Gestor.Infrastructure/Gestor.Infrastructure.Mappings.Ferramentas/TrilhaMap.cs new file mode 100644 index 0000000..0a58cc8 --- /dev/null +++ b/Gestor.Infrastructure/Gestor.Infrastructure.Mappings.Ferramentas/TrilhaMap.cs @@ -0,0 +1,24 @@ +using FluentNHibernate.Mapping;
+using Gestor.Infrastructure.Entities.Ferramentas;
+using Gestor.Infrastructure.Entities.Generic;
+using System;
+using System.Linq.Expressions;
+using System.Runtime.CompilerServices;
+
+namespace Gestor.Infrastructure.Mappings.Ferramentas
+{
+ public class TrilhaMap : ClassMap<TrilhaDb>
+ {
+ public TrilhaMap()
+ {
+ base.Table("Trilha");
+ base.LazyLoad();
+ base.Id((TrilhaDb x) => (object)x.Id).GeneratedBy.Identity();
+ base.Map((TrilhaDb x) => x.Titulo);
+ base.Map((TrilhaDb x) => x.Descricao);
+ base.Map((TrilhaDb x) => (object)x.Intervalo);
+ base.Map((TrilhaDb x) => (object)x.Ativo);
+ base.Map((TrilhaDb x) => (object)x.Tipo);
+ }
+ }
+}
\ No newline at end of file diff --git a/Gestor.Infrastructure/Gestor.Infrastructure.Mappings.Ferramentas/VinculoRepasseMap.cs b/Gestor.Infrastructure/Gestor.Infrastructure.Mappings.Ferramentas/VinculoRepasseMap.cs new file mode 100644 index 0000000..d259e7e --- /dev/null +++ b/Gestor.Infrastructure/Gestor.Infrastructure.Mappings.Ferramentas/VinculoRepasseMap.cs @@ -0,0 +1,24 @@ +using FluentNHibernate.Mapping;
+using Gestor.Infrastructure.Entities.Ferramentas;
+using Gestor.Infrastructure.Entities.Generic;
+using Gestor.Infrastructure.Entities.Seguros;
+using System;
+using System.Linq.Expressions;
+using System.Runtime.CompilerServices;
+
+namespace Gestor.Infrastructure.Mappings.Ferramentas
+{
+ public class VinculoRepasseMap : ClassMap<VinculoRepasseDb>
+ {
+ public VinculoRepasseMap()
+ {
+ base.Table("VinculoRepasse");
+ base.LazyLoad();
+ base.Id((VinculoRepasseDb x) => (object)x.Id).GeneratedBy.Identity();
+ base.Map((VinculoRepasseDb x) => (object)x.IdRepasse).Not.Nullable();
+ base.References<TipoVendedorDb>((VinculoRepasseDb x) => x.TipoVendedor).Not.Nullable().Fetch.Join();
+ base.References<RepasseDb>((VinculoRepasseDb x) => x.RepasseVinculo).Not.Nullable().Fetch.Join();
+ base.References<TipoVendedorDb>((VinculoRepasseDb x) => x.TipoVendedorVinculo).Not.Nullable().Fetch.Join();
+ }
+ }
+}
\ No newline at end of file |