summaryrefslogtreecommitdiff
path: root/Gestor.Infrastructure/Gestor.Infrastructure.Repository.Logic/DetalheExtratoRepository.cs
diff options
context:
space:
mode:
authorLucas Faria Mendes <lucas.fariamo08@gmail.com>2026-03-30 13:38:18 +0000
committerLucas Faria Mendes <lucas.fariamo08@gmail.com>2026-03-30 13:38:18 +0000
commit1f4e14b2e973ee7de337fd4866d9a5ceff5cb6d1 (patch)
treee1c3b20ea08f0cf71122a1e73f0d395f8fd83874 /Gestor.Infrastructure/Gestor.Infrastructure.Repository.Logic/DetalheExtratoRepository.cs
parent674ca83ba9243a9e95a7568c797668dab6aee26a (diff)
downloadgestor-1f4e14b2e973ee7de337fd4866d9a5ceff5cb6d1.tar.gz
gestor-1f4e14b2e973ee7de337fd4866d9a5ceff5cb6d1.zip
chore: location
Diffstat (limited to 'Gestor.Infrastructure/Gestor.Infrastructure.Repository.Logic/DetalheExtratoRepository.cs')
-rw-r--r--Gestor.Infrastructure/Gestor.Infrastructure.Repository.Logic/DetalheExtratoRepository.cs99
1 files changed, 0 insertions, 99 deletions
diff --git a/Gestor.Infrastructure/Gestor.Infrastructure.Repository.Logic/DetalheExtratoRepository.cs b/Gestor.Infrastructure/Gestor.Infrastructure.Repository.Logic/DetalheExtratoRepository.cs
deleted file mode 100644
index 54af174..0000000
--- a/Gestor.Infrastructure/Gestor.Infrastructure.Repository.Logic/DetalheExtratoRepository.cs
+++ /dev/null
@@ -1,99 +0,0 @@
-using AutoMapper;
-using Gestor.Infrastructure.Entities.Generic;
-using Gestor.Infrastructure.Entities.Seguros;
-using Gestor.Infrastructure.Mappers;
-using Gestor.Infrastructure.Repository.Generic;
-using Gestor.Infrastructure.Repository.Interface;
-using Gestor.Infrastructure.UnitOfWork.Generic;
-using Gestor.Model.Common;
-using Gestor.Model.Domain.Seguros;
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Linq.Expressions;
-using System.Runtime.CompilerServices;
-
-namespace Gestor.Infrastructure.Repository.Logic
-{
- public class DetalheExtratoRepository : GenericRepository<DetalheExtratoDb>, IDetalheExtratoRepository, IGenericRepository<DetalheExtratoDb>
- {
- private readonly GenericUnitOfWork _unitOfWork;
-
- public DetalheExtratoRepository(GenericUnitOfWork unitOfWork) : base(unitOfWork.Session)
- {
- this._unitOfWork = unitOfWork;
- }
-
- public bool Completo(long id)
- {
- List<StatusParcela> statusParcelas = new List<StatusParcela>()
- {
- StatusParcela.BaixadaCritica,
- StatusParcela.Baixada,
- StatusParcela.BaixadaDiferencaPercentual,
- StatusParcela.BaixadaAnteriormente,
- StatusParcela.BaixadaManualmente,
- StatusParcela.DesconsideradaUsuario,
- StatusParcela.DesconsideradaSistema
- };
- return (
- from x in base.All()
- where x.Extrato.Id == id
- select x).All<DetalheExtratoDb>((DetalheExtratoDb x) => statusParcelas.Contains(x.Status.Value));
- }
-
- public void Delete(long id)
- {
- DetalheExtratoDb detalheExtratoDb = base.FindEntityById(id);
- if (detalheExtratoDb == null)
- {
- return;
- }
- base.Delete(detalheExtratoDb);
- }
-
- public List<DetalheExtrato> Find(long id)
- {
- List<DetalheExtratoDb> list = (
- from x in base.All()
- where x.Extrato.Id == id
- select x).ToList<DetalheExtratoDb>();
- return ApplicationMapper.Mapper.Map<List<DetalheExtratoDb>, List<DetalheExtrato>>(list);
- }
-
- public DetalheExtrato FindById(long id)
- {
- DetalheExtratoDb detalheExtratoDb = base.FindEntityById(id);
- return ApplicationMapper.Mapper.Map<DetalheExtratoDb, DetalheExtrato>(detalheExtratoDb);
- }
-
- public List<DetalheExtrato> FindByLongId(long? id)
- {
- List<DetalheExtratoDb> list = (
- from x in base.All()
- where (long?)x.Extrato.Id == id
- select x).ToList<DetalheExtratoDb>();
- return ApplicationMapper.Mapper.Map<List<DetalheExtratoDb>, List<DetalheExtrato>>(list);
- }
-
- public DetalheExtrato FindByParcelaId(long id)
- {
- DetalheExtratoDb detalheExtratoDb = base.All().FirstOrDefault<DetalheExtratoDb>((DetalheExtratoDb x) => x.Parcela == (long?)id);
- return ApplicationMapper.Mapper.Map<DetalheExtratoDb, DetalheExtrato>(detalheExtratoDb);
- }
-
- public DetalheExtrato Merge(DetalheExtrato parcela)
- {
- DetalheExtratoDb detalheExtratoDb = ApplicationMapper.Mapper.Map<DetalheExtrato, DetalheExtratoDb>(parcela);
- base.Merge(detalheExtratoDb);
- return ApplicationMapper.Mapper.Map<DetalheExtratoDb, DetalheExtrato>(detalheExtratoDb);
- }
-
- public DetalheExtrato SaveOrUpdate(DetalheExtrato parcela)
- {
- DetalheExtratoDb detalheExtratoDb = ApplicationMapper.Mapper.Map<DetalheExtrato, DetalheExtratoDb>(parcela);
- this.SaveOrUpdate(detalheExtratoDb);
- return ApplicationMapper.Mapper.Map<DetalheExtratoDb, DetalheExtrato>(detalheExtratoDb);
- }
- }
-} \ No newline at end of file