diff --git a/Collaborateur_Epa_Back/espacecollab.backend.infrastructure.sql.dtos/CollaborateurEffectuePeriodeEssaiSqlDto.cs b/Collaborateur_Epa_Back/espacecollab.backend.infrastructure.sql.dtos/CollaborateurEffectuePeriodeEssaiSqlDto.cs deleted file mode 100644 index bfe853b..0000000 --- a/Collaborateur_Epa_Back/espacecollab.backend.infrastructure.sql.dtos/CollaborateurEffectuePeriodeEssaiSqlDto.cs +++ /dev/null @@ -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; - } - } -} diff --git a/Collaborateur_Epa_Back/espacecollab.backend.infrastructure.sql.dtos/CollaborateurEstFonctionSqlDto.cs b/Collaborateur_Epa_Back/espacecollab.backend.infrastructure.sql.dtos/CollaborateurEstFonctionSqlDto.cs index be2ecde..909ec84 100644 --- a/Collaborateur_Epa_Back/espacecollab.backend.infrastructure.sql.dtos/CollaborateurEstFonctionSqlDto.cs +++ b/Collaborateur_Epa_Back/espacecollab.backend.infrastructure.sql.dtos/CollaborateurEstFonctionSqlDto.cs @@ -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() diff --git a/Collaborateur_Epa_Back/espacecollab.backend.infrastructure.sql.dtos/PeriodeEssaiSqlDto.cs b/Collaborateur_Epa_Back/espacecollab.backend.infrastructure.sql.dtos/PeriodeEssaiSqlDto.cs index 118637a..ead65f7 100644 --- a/Collaborateur_Epa_Back/espacecollab.backend.infrastructure.sql.dtos/PeriodeEssaiSqlDto.cs +++ b/Collaborateur_Epa_Back/espacecollab.backend.infrastructure.sql.dtos/PeriodeEssaiSqlDto.cs @@ -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; } } } diff --git a/Collaborateur_Epa_Back/espacecollab.backend.infrastructure.sql/SqlRepo/CollaborateurRepository.cs b/Collaborateur_Epa_Back/espacecollab.backend.infrastructure.sql/SqlRepo/CollaborateurRepository.cs index e0161ec..67ffd1b 100644 --- a/Collaborateur_Epa_Back/espacecollab.backend.infrastructure.sql/SqlRepo/CollaborateurRepository.cs +++ b/Collaborateur_Epa_Back/espacecollab.backend.infrastructure.sql/SqlRepo/CollaborateurRepository.cs @@ -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().Add(newCollaborateur); Context.SaveChanges(); diff --git a/Collaborateur_Epa_Back/espacecollab.backend.infrastructure.sql/SqlRepo/Interface/IAgenceRepository.cs b/Collaborateur_Epa_Back/espacecollab.backend.infrastructure.sql/SqlRepo/Interface/IAgenceRepository.cs new file mode 100644 index 0000000..f0470bc --- /dev/null +++ b/Collaborateur_Epa_Back/espacecollab.backend.infrastructure.sql/SqlRepo/Interface/IAgenceRepository.cs @@ -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? GetAllAgences(); + AgenceSqlDto? GetAgenceById(AgenceSqlDto agence); + AgenceSqlDto UpdateAgence(AgenceSqlDto agence); + } +} \ No newline at end of file diff --git a/Collaborateur_Epa_Back/espacecollab.backend.infrastructure.sql/SqlRepo/Interface/IBusinessUnitRepository.cs b/Collaborateur_Epa_Back/espacecollab.backend.infrastructure.sql/SqlRepo/Interface/IBusinessUnitRepository.cs new file mode 100644 index 0000000..3ccc5ea --- /dev/null +++ b/Collaborateur_Epa_Back/espacecollab.backend.infrastructure.sql/SqlRepo/Interface/IBusinessUnitRepository.cs @@ -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? GetAllBusinessUnits(); + BusinessUnitSqlDto? GetBusinessUnitById(BusinessUnitSqlDto BusinessUnit); + BusinessUnitSqlDto UpdateBusinessUnit(BusinessUnitSqlDto BusinessUnit); + } +} \ No newline at end of file diff --git a/Collaborateur_Epa_Back/espacecollab.backend.infrastructure.sql/SqlRepo/Interface/IProjetRepository.cs b/Collaborateur_Epa_Back/espacecollab.backend.infrastructure.sql/SqlRepo/Interface/IProjetRepository.cs new file mode 100644 index 0000000..b2fa7a3 --- /dev/null +++ b/Collaborateur_Epa_Back/espacecollab.backend.infrastructure.sql/SqlRepo/Interface/IProjetRepository.cs @@ -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? GetAllProjets(); + IList? GetProjetsByClient(string client); + ProjetSqlDto? GetProjetById(ProjetSqlDto projet); + ProjetSqlDto UpdateProjet(ProjetSqlDto projet); + } +} \ No newline at end of file diff --git a/Collaborateur_Epa_Back/espacecollab.backend.infrastructure.sql/SqlRepo/Interface/IReferencementRepository.cs b/Collaborateur_Epa_Back/espacecollab.backend.infrastructure.sql/SqlRepo/Interface/IReferencementRepository.cs new file mode 100644 index 0000000..43810f3 --- /dev/null +++ b/Collaborateur_Epa_Back/espacecollab.backend.infrastructure.sql/SqlRepo/Interface/IReferencementRepository.cs @@ -0,0 +1,13 @@ +using espacecollab.backend.infrastructure.sql.dtos; + +namespace espacecollab.backend.infrastructure.sql.SqlRepo.Interface +{ + public interface IReferencementRepository + { + IList? GetReferrersByCollaborateurId(Guid collaborateurId); + IList? GetReferrersByCollaborateurApsideMail(string apsideMail); + + //TODO Voir les attentes concernant "le référent ayant le plus suivi depuis une date" + + } +} \ No newline at end of file