Création des interfaces pour autres repos. Agence incomplète, Période Essai à voir

pull/2/head
Clement FERRERE 3 years ago
parent fcdff5d566
commit 7b7bd77e6e
  1. 21
      Collaborateur_Epa_Back/espacecollab.backend.infrastructure.sql.dtos/CollaborateurEffectuePeriodeEssaiSqlDto.cs
  2. 2
      Collaborateur_Epa_Back/espacecollab.backend.infrastructure.sql.dtos/CollaborateurEstFonctionSqlDto.cs
  3. 4
      Collaborateur_Epa_Back/espacecollab.backend.infrastructure.sql.dtos/PeriodeEssaiSqlDto.cs
  4. 2
      Collaborateur_Epa_Back/espacecollab.backend.infrastructure.sql/SqlRepo/CollaborateurRepository.cs
  5. 12
      Collaborateur_Epa_Back/espacecollab.backend.infrastructure.sql/SqlRepo/Interface/IAgenceRepository.cs
  6. 12
      Collaborateur_Epa_Back/espacecollab.backend.infrastructure.sql/SqlRepo/Interface/IBusinessUnitRepository.cs
  7. 13
      Collaborateur_Epa_Back/espacecollab.backend.infrastructure.sql/SqlRepo/Interface/IProjetRepository.cs
  8. 13
      Collaborateur_Epa_Back/espacecollab.backend.infrastructure.sql/SqlRepo/Interface/IReferencementRepository.cs

@ -1,21 +0,0 @@
using System.Diagnostics.CodeAnalysis;
namespace espacecollab.backend.infrastructure.sql.dtos.Associations
{
public class CollaborateurEffectuePeriodeEssaiSqlDto
{
public Guid CollaborateurId { get; set; }
public Guid PeriodeEssaiId { get; set;}
[ExcludeFromCodeCoverage]
private CollaborateurEffectuePeriodeEssaiSqlDto()
{
}
public CollaborateurEffectuePeriodeEssaiSqlDto(Guid collaborateurId, Guid periodeEssaiId)
{
CollaborateurId = collaborateurId;
PeriodeEssaiId = periodeEssaiId;
}
}
}

@ -5,7 +5,7 @@ namespace espacecollab.backend.infrastructure.sql.dtos.Associations
public class CollaborateurEstFonctionSqlDto
{
public Guid CollaborateurId { get; set; }
public Guid FonctionId { get; set;}
public Guid FonctionId { get; set; }
[ExcludeFromCodeCoverage]
private CollaborateurEstFonctionSqlDto()

@ -10,13 +10,14 @@ namespace espacecollab.backend.infrastructure.sql.dtos
public DateTime RealEndingDate { get; set; }
public string Comment { get; set; }
public EnumIssue Issue { get; set; }
public Guid CollaborateurId { get; set; }
[ExcludeFromCodeCoverage]
private PeriodeEssaiSqlDto()
{
}
public PeriodeEssaiSqlDto(Guid id, DateTime startingDate, DateTime plannedEndingDate, DateTime realEndingDate, string comment, EnumIssue issue)
public PeriodeEssaiSqlDto(Guid id, DateTime startingDate, DateTime plannedEndingDate, DateTime realEndingDate, string comment, EnumIssue issue, Guid collaborateurId)
{
Id = id;
StartingDate = startingDate;
@ -24,6 +25,7 @@ namespace espacecollab.backend.infrastructure.sql.dtos
RealEndingDate = realEndingDate;
Comment = comment;
Issue = issue;
CollaborateurId = collaborateurId;
}
}
}

@ -19,7 +19,7 @@ namespace espacecollab.backend.infrastructure.sql.SqlRepo
CollaborateurSqlDto? collaborateurAlreadyExists = Context.Collaborateur?.FirstOrDefault(c => c.Id == newCollaborateur.Id);
if (collaborateurAlreadyExists != null)
return null;
Context.Set<CollaborateurSqlDto>().Add(newCollaborateur);
Context.SaveChanges();

@ -0,0 +1,12 @@
using espacecollab.backend.infrastructure.sql.dtos;
namespace espacecollab.backend.infrastructure.sql.SqlRepo.Interface
{
public interface IAgenceRepository
{
AgenceSqlDto? AddAgence(AgenceSqlDto newAgence);
IList<AgenceSqlDto>? GetAllAgences();
AgenceSqlDto? GetAgenceById(AgenceSqlDto agence);
AgenceSqlDto UpdateAgence(AgenceSqlDto agence);
}
}

@ -0,0 +1,12 @@
using espacecollab.backend.infrastructure.sql.dtos;
namespace espacecollab.backend.infrastructure.sql.SqlRepo.Interface
{
public interface IBusinessUnitRepository
{
BusinessUnitSqlDto? AddBusinessUnit(BusinessUnitSqlDto newBusinessUnit);
IList<BusinessUnitSqlDto>? GetAllBusinessUnits();
BusinessUnitSqlDto? GetBusinessUnitById(BusinessUnitSqlDto BusinessUnit);
BusinessUnitSqlDto UpdateBusinessUnit(BusinessUnitSqlDto BusinessUnit);
}
}

@ -0,0 +1,13 @@
using espacecollab.backend.infrastructure.sql.dtos;
namespace espacecollab.backend.infrastructure.sql.SqlRepo.Interface
{
public interface IProjetRepository
{
ProjetSqlDto? AddProjet(ProjetSqlDto newProjet);
IList<ProjetSqlDto>? GetAllProjets();
IList<ProjetSqlDto>? GetProjetsByClient(string client);
ProjetSqlDto? GetProjetById(ProjetSqlDto projet);
ProjetSqlDto UpdateProjet(ProjetSqlDto projet);
}
}

@ -0,0 +1,13 @@
using espacecollab.backend.infrastructure.sql.dtos;
namespace espacecollab.backend.infrastructure.sql.SqlRepo.Interface
{
public interface IReferencementRepository
{
IList<CollaborateurSqlDto>? GetReferrersByCollaborateurId(Guid collaborateurId);
IList<CollaborateurSqlDto>? GetReferrersByCollaborateurApsideMail(string apsideMail);
//TODO Voir les attentes concernant "le référent ayant le plus suivi depuis une date"
}
}
Loading…
Cancel
Save