diff options
Diffstat (limited to 'Codemerx/Gestor.Infrastructure/Gestor.Infrastructure.Mappings.Ferramentas/TarefaMap.cs')
| -rw-r--r-- | Codemerx/Gestor.Infrastructure/Gestor.Infrastructure.Mappings.Ferramentas/TarefaMap.cs | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/Codemerx/Gestor.Infrastructure/Gestor.Infrastructure.Mappings.Ferramentas/TarefaMap.cs b/Codemerx/Gestor.Infrastructure/Gestor.Infrastructure.Mappings.Ferramentas/TarefaMap.cs new file mode 100644 index 0000000..d4ebb97 --- /dev/null +++ b/Codemerx/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 |