Création des projets et des DTOs SQL

pull/1/head
Clement FERRERE 3 years ago
parent ef5d596d43
commit be92114591
  1. 25
      Collaborateur_Epa_Back/Collaborateur_Epa_Back.sln
  2. 8
      Collaborateur_Epa_Back/Model/Class1.cs
  3. 7
      Collaborateur_Epa_Back/Model/Model.csproj
  4. 161
      Collaborateur_Epa_Back/db/db_1_0_0.sql
  5. 25
      Collaborateur_Epa_Back/espacecollab.backend.api/Program.cs
  6. 31
      Collaborateur_Epa_Back/espacecollab.backend.api/Properties/launchSettings.json
  7. 8
      Collaborateur_Epa_Back/espacecollab.backend.api/appsettings.Development.json
  8. 9
      Collaborateur_Epa_Back/espacecollab.backend.api/appsettings.json
  9. 17
      Collaborateur_Epa_Back/espacecollab.backend.api/espacecollab.backend.api.csproj
  10. 9
      Collaborateur_Epa_Back/espacecollab.backend.appservices.dtos/espacecollab.backend.appservices.dtos.csproj
  11. 9
      Collaborateur_Epa_Back/espacecollab.backend.appservices/espacecollab.backend.appservices.csproj
  12. 15
      Collaborateur_Epa_Back/espacecollab.backend.infrastructure.sql.dtos/AgenceDto.cs
  13. 17
      Collaborateur_Epa_Back/espacecollab.backend.infrastructure.sql.dtos/BusinessUnitDto.cs
  14. 20
      Collaborateur_Epa_Back/espacecollab.backend.infrastructure.sql.dtos/CollaborateurAppartientBusinessUnitDto.cs
  15. 21
      Collaborateur_Epa_Back/espacecollab.backend.infrastructure.sql.dtos/CollaborateurCollaboreProjetDto.cs
  16. 31
      Collaborateur_Epa_Back/espacecollab.backend.infrastructure.sql.dtos/CollaborateurDto.cs
  17. 20
      Collaborateur_Epa_Back/espacecollab.backend.infrastructure.sql.dtos/CollaborateurEffectuePeriodeEssaiDto.cs
  18. 20
      Collaborateur_Epa_Back/espacecollab.backend.infrastructure.sql.dtos/CollaborateurEstFonctionDto.cs
  19. 9
      Collaborateur_Epa_Back/espacecollab.backend.infrastructure.sql.dtos/EnumGenre.cs
  20. 11
      Collaborateur_Epa_Back/espacecollab.backend.infrastructure.sql.dtos/EnumIssue.cs
  21. 10
      Collaborateur_Epa_Back/espacecollab.backend.infrastructure.sql.dtos/EnumStatut.cs
  22. 15
      Collaborateur_Epa_Back/espacecollab.backend.infrastructure.sql.dtos/FonctionDto.cs
  23. 19
      Collaborateur_Epa_Back/espacecollab.backend.infrastructure.sql.dtos/PeriodeEssaiDto.cs
  24. 19
      Collaborateur_Epa_Back/espacecollab.backend.infrastructure.sql.dtos/ProjetDto.cs
  25. 20
      Collaborateur_Epa_Back/espacecollab.backend.infrastructure.sql.dtos/ProjetUtiliseTechnologieDto.cs
  26. 23
      Collaborateur_Epa_Back/espacecollab.backend.infrastructure.sql.dtos/ReferencementDto.cs
  27. 20
      Collaborateur_Epa_Back/espacecollab.backend.infrastructure.sql.dtos/SiteDeveloppeProjetDto.cs
  28. 17
      Collaborateur_Epa_Back/espacecollab.backend.infrastructure.sql.dtos/SiteDto.cs
  29. 15
      Collaborateur_Epa_Back/espacecollab.backend.infrastructure.sql.dtos/TechnologieDto.cs
  30. 9
      Collaborateur_Epa_Back/espacecollab.backend.infrastructure.sql.dtos/espacecollab.backend.infrastructure.sql.dtos.csproj
  31. 152
      Collaborateur_Epa_Back/espacecollab.backend.infrastructure.sql/db/db_1_0_0.sql
  32. 9
      Collaborateur_Epa_Back/espacecollab.backend.infrastructure.sql/espacecollab.backend.infrastructure.sql.csproj
  33. 49
      Collaborateur_Epa_Back/espacecollab.backend.sln

@ -1,25 +0,0 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.31729.503
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Model", "Model\Model.csproj", "{41657DCB-D497-4D12-BE12-E9F1CB0731D5}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{41657DCB-D497-4D12-BE12-E9F1CB0731D5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{41657DCB-D497-4D12-BE12-E9F1CB0731D5}.Debug|Any CPU.Build.0 = Debug|Any CPU
{41657DCB-D497-4D12-BE12-E9F1CB0731D5}.Release|Any CPU.ActiveCfg = Release|Any CPU
{41657DCB-D497-4D12-BE12-E9F1CB0731D5}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {0A56A44C-135E-4CE4-834B-8DFDF69DC415}
EndGlobalSection
EndGlobal

@ -1,8 +0,0 @@
using System;
namespace Model
{
public class Class1
{
}
}

@ -1,7 +0,0 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
</PropertyGroup>
</Project>

@ -1,161 +0,0 @@
DROP DATABASE IF EXISTS collaborateur_epa;
CREATE DATABASE IF NOT EXISTS collaborateur_epa /*!40100 DEFAULT CHARACTER SET latin1 */;
USE collaborateur_epa;
DROP TABLE IF EXISTS agence;
CREATE TABLE IF NOT EXISTS agence(
id int NOT NULL AUTO_INCREMENT,
nom varchar(100) NOT NULL UNIQUE,
adresse_id int NOT NULL,
PRIMARY KEY (id)
);
DROP TABLE IF EXISTS business_unit;
CREATE TABLE IF NOT EXISTS business_unit(
id int NOT NULL AUTO_INCREMENT,
nom varchar(100) NOT NULL UNIQUE,
agence_id int NOT NULL,
CONSTRAINT FK_BUSINESS_UNIT_AGENCE FOREIGN KEY (agence_id) references agence(id),
PRIMARY KEY (id)
);
DROP TABLE IF EXISTS site;
CREATE TABLE IF NOT EXISTS site(
id int NOT NULL AUTO_INCREMENT,
nom varchar(100) NOT NULL UNIQUE,
adresse varchar(200) NOT NULL,
business_unit_id int NOT NULL,
CONSTRAINT FK_SITE_BUSINESS_UNIT FOREIGN KEY (business_unit_id) references business_unit(id),
PRIMARY KEY (id)
);
DROP TABLE IF EXISTS projet;
CREATE TABLE IF NOT EXISTS projet(
id int NOT NULL AUTO_INCREMENT,
nom varchar(100) NOT NULL UNIQUE,
client varchar(100) NOT NULL,
description varchar(100) NOT NULL,
date_debut date NOT NULL,
dateFin date NOT NULL,
PRIMARY KEY (id)
);
DROP TABLE IF EXISTS technologie;
CREATE TABLE IF NOT EXISTS technologie(
id int NOT NULL UNIQUE,
intitule varchar(100) NOT NULL UNIQUE,
PRIMARY KEY (id)
);
DROP TABLE IF EXISTS periode_essai;
CREATE TABLE IF NOT EXISTS periode_essai(
id int NOT NULL AUTO_INCREMENT,
date_debut date NOT NULL,
date_fin_prevue date NOT NULL,
date_fin_effective date NOT NULL,
commentaire varchar(100),
issue ENUM('VALIDEE','PROLONGEE_COLLAB','PROLONGEE_APSIDE','ARRETEE_COLLAB','ARRETEE_APSIDE'),
PRIMARY KEY (id)
);
DROP TABLE IF EXISTS fonction;
CREATE TABLE IF NOT EXISTS fonction(
id int NOT NULL UNIQUE,
intitule varchar(100) NOT NULL UNIQUE,
PRIMARY KEY (id)
);
DROP TABLE IF EXISTS collaborateur;
CREATE TABLE IF NOT EXISTS collaborateur(
id int NOT NULL AUTO_INCREMENT,
nom varchar(100) NOT NULL UNIQUE,
prenom varchar(100) NOT NULL,
date_naissance date NOT NULL,
genre ENUM('MASCULIN','FEMININ','AUTRE'),
statut ENUM('CADRE','NON-CADRE','ALTERNANT','STAGIAIRE'),
nombre_enfants smallint,
telephone varchar(15),
mail_personnel varchar(100),
mail_apside varchar(100),
date_depart date,
parrain_id int,
CONSTRAINT FK_COLLABORATEUR_PARRAIN FOREIGN KEY (parrain_id) REFERENCES collaborateur(id),
PRIMARY KEY (id)
);
DROP TABLE IF EXISTS referencement;
CREATE TABLE IF NOT EXISTS referencement(
id int NOT NULL AUTO_INCREMENT,
date_debut date NOT NULL,
date_fin date NOT NULL,
refere_id int NOT NULL,
referent_id int NOT NULL,
CONSTRAINT FK_COLLABORATEUR_REFERE FOREIGN KEY (refere_id) REFERENCES collaborateur(id),
CONSTRAINT FK_COLLABORATEUR_REFERENT FOREIGN KEY (referent_id) REFERENCES collaborateur(id),
PRIMARY KEY (id)
);
DROP TABLE IF EXISTS collaborateur_est_fonction;
CREATE TABLE IF NOT EXISTS collaborateur_est_fonction(
collaborateur_id int NOT NULL,
fonction_id int NOT NULL,
PRIMARY KEY (collaborateur_id,fonction_id),
CONSTRAINT FK_COLLABORATEUR_FONCTION FOREIGN KEY (collaborateur_id) REFERENCES collaborateur(id),
CONSTRAINT FK_FONCTION_COLLABORATEUR FOREIGN KEY (fonction_id) REFERENCES fonction(id)
);
DROP TABLE IF EXISTS collaborateur_appartient_business_unit;
CREATE TABLE IF NOT EXISTS collaborateur_appartient_business_unit(
collaborateur_id int NOT NULL,
business_unit_id int NOT NULL,
PRIMARY KEY (collaborateur_id,business_unit_id),
CONSTRAINT FK_COLLABORATEUR_BUSINESS_UNIT FOREIGN KEY (collaborateur_id) REFERENCES collaborateur(id),
CONSTRAINT FK_BUSINESS_UNIT_COLLABORATEUR FOREIGN KEY (business_unit_id) REFERENCES business_unit(id)
);
DROP TABLE IF EXISTS collaborateur_effectue_periode_essai;
CREATE TABLE IF NOT EXISTS collaborateur_effectue_periode_essai(
collaborateur_id int NOT NULL,
periode_essai_id int NOT NULL,
PRIMARY KEY (collaborateur_id,periode_essai_id),
CONSTRAINT FK_COLLABORATEUR_PERIODE_ESSAI FOREIGN KEY (collaborateur_id) REFERENCES collaborateur(id),
CONSTRAINT FK_PERIODE_ESSAI_COLLABORATEUR FOREIGN KEY (periode_essai_id) REFERENCES periode_essai(id)
);
DROP TABLE IF EXISTS site_developpe_projet;
CREATE TABLE IF NOT EXISTS site_developpe_projet(
site_id int NOT NULL,
projet_id int NOT NULL,
PRIMARY KEY (site_id,projet_id),
CONSTRAINT FK_SITE_PROJET FOREIGN KEY (site_id) REFERENCES site(id),
CONSTRAINT FK_PROJET_SITE FOREIGN KEY (projet_id) REFERENCES projet(id)
);
DROP TABLE IF EXISTS projet_utilise_technologie;
CREATE TABLE IF NOT EXISTS projet_utilise_technologie(
projet_id int NOT NULL,
technologie_id int NOT NULL,
PRIMARY KEY (projet_id,technologie_id),
CONSTRAINT FK_PROJET_TECHNOLOGIE FOREIGN KEY (projet_id) REFERENCES projet(id),
CONSTRAINT FK_TECHNOLOGIE_PROJET FOREIGN KEY (technologie_id) REFERENCES technologie(id)
);
DROP TABLE IF EXISTS collaborateur_manage_projet;
CREATE TABLE IF NOT EXISTS collaborateur_manage_projet(
collaborateur_id int NOT NULL,
projet_id int NOT NULL,
PRIMARY KEY (collaborateur_id,projet_id),
CONSTRAINT FK_COLLABORATEUR_MANAGE_PROJET FOREIGN KEY (collaborateur_id) REFERENCES collaborateur(id),
CONSTRAINT FK_PROJET_MANAGE_COLLABORATEUR FOREIGN KEY (projet_id) REFERENCES projet(id)
);
DROP TABLE IF EXISTS collaborateur_collabore_projet;
CREATE TABLE IF NOT EXISTS collaborateur_collabore_projet(
collaborateur_id int NOT NULL,
projet_id int NOT NULL,
PRIMARY KEY (collaborateur_id,projet_id),
CONSTRAINT FK_COLLABORATEUR_COLLABORE_PROJET FOREIGN KEY (collaborateur_id) REFERENCES collaborateur(id),
CONSTRAINT FK_PROJET_COLLABORE_COLLABORATEUR FOREIGN KEY (projet_id) REFERENCES projet(id)
);

@ -0,0 +1,25 @@
var builder = WebApplication.CreateBuilder(args);
// Add services to the container.
builder.Services.AddControllers();
// Learn more about configuring Swagger/OpenAPI at https://aka.ms/aspnetcore/swashbuckle
builder.Services.AddEndpointsApiExplorer();
builder.Services.AddSwaggerGen();
var app = builder.Build();
// Configure the HTTP request pipeline.
if (app.Environment.IsDevelopment())
{
app.UseSwagger();
app.UseSwaggerUI();
}
app.UseHttpsRedirection();
app.UseAuthorization();
app.MapControllers();
app.Run();

@ -0,0 +1,31 @@
{
"$schema": "https://json.schemastore.org/launchsettings.json",
"iisSettings": {
"windowsAuthentication": false,
"anonymousAuthentication": true,
"iisExpress": {
"applicationUrl": "http://localhost:27916",
"sslPort": 44341
}
},
"profiles": {
"espacecollab.backend.api": {
"commandName": "Project",
"dotnetRunMessages": true,
"launchBrowser": true,
"launchUrl": "swagger",
"applicationUrl": "https://localhost:7125;http://localhost:5125",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
},
"IIS Express": {
"commandName": "IISExpress",
"launchBrowser": true,
"launchUrl": "swagger",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
}
}
}

@ -0,0 +1,8 @@
{
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft.AspNetCore": "Warning"
}
}
}

@ -0,0 +1,9 @@
{
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft.AspNetCore": "Warning"
}
},
"AllowedHosts": "*"
}

@ -0,0 +1,17 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.2.3" />
</ItemGroup>
<ItemGroup>
<Folder Include="Controllers\" />
</ItemGroup>
</Project>

@ -0,0 +1,9 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
</Project>

@ -0,0 +1,9 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
</Project>

@ -0,0 +1,15 @@
using System.Diagnostics.CodeAnalysis;
namespace espacecollab.backend.infrastructure.sql.dtos
{
public class AgenceDto
{
private Guid Id { get; set; }
private string Name { get; set; }
[ExcludeFromCodeCoverage]
private AgenceDto()
{
}
}
}

@ -0,0 +1,17 @@
using System.Diagnostics.CodeAnalysis;
namespace espacecollab.backend.infrastructure.sql.dtos
{
public class BusinessUnitDto
{
private Guid Id { get; set; }
private string Name { get; set; }
private Guid AgenceId { get; set; }
[ExcludeFromCodeCoverage]
private BusinessUnitDto()
{
}
}
}

@ -0,0 +1,20 @@
using System;
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace espacecollab.backend.infrastructure.sql.dtos.Associations
{
public class CollaborateurAppartientBusinessUnitDto
{
private Guid CollaborateurId { get; set; }
private Guid BusinessUnitId { get; set; }
[ExcludeFromCodeCoverage]
private CollaborateurAppartientBusinessUnitDto()
{
}
}
}

@ -0,0 +1,21 @@
using System;
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace espacecollab.backend.infrastructure.sql.dtos
{
public class CollaborateurCollaboreProjetDto
{
private Guid CollaborateurId { get; set; }
private Guid ProjetId { get; set; }
private bool IsManager { get; set; }
[ExcludeFromCodeCoverage]
private CollaborateurCollaboreProjetDto()
{
}
}
}

@ -0,0 +1,31 @@
using espacecollab.backend.infrastructure.sql.dtos.Enums;
using System;
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace espacecollab.backend.infrastructure.sql.dtos
{
public class CollaborateurDto
{
private Guid Id { get; set; }
private string Name { get; set; }
private string FirstName { get; set; }
private DateTime BirthDate { get; set; }
private EnumGenre Gender { get; set; }
private EnumStatut Status { get; set; }
private int ChildrenNumber { get; set; }
private string Telephone { get; set; }
private string PersonalMail { get; set; }
private string ApsideMail { get; set; }
private DateTime ResignationDate { get; set; }
private Guid ReferrerId { get; set; }
[ExcludeFromCodeCoverage]
private CollaborateurDto()
{
}
}
}

@ -0,0 +1,20 @@
using System;
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace espacecollab.backend.infrastructure.sql.dtos.Associations
{
public class CollaborateurEffectuePeriodeEssaiDto
{
private Guid CollaborateurId { get; set; }
private Guid PeriodeEssaiId { get; set;}
[ExcludeFromCodeCoverage]
private CollaborateurEffectuePeriodeEssaiDto()
{
}
}
}

@ -0,0 +1,20 @@
using System;
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace espacecollab.backend.infrastructure.sql.dtos.Associations
{
public class CollaborateurEstFonctionDto
{
private Guid CollaborateurId { get; set; }
private Guid FonctionId { get; set;}
[ExcludeFromCodeCoverage]
private CollaborateurEstFonctionDto()
{
}
}
}

@ -0,0 +1,9 @@
namespace espacecollab.backend.infrastructure.sql.dtos.Enums
{
enum EnumGenre
{
MASCULIN,
FEMININ,
AUTRE
}
}

@ -0,0 +1,11 @@
namespace espacecollab.backend.infrastructure.sql.dtos
{
enum EnumIssue
{
VALIDEE,
PROLONGEE_COLLAB,
PROLONGEE_APSIDE,
ARRETEE_COLLAB,
ARRETEE_APSIDE
}
}

@ -0,0 +1,10 @@
namespace espacecollab.backend.infrastructure.sql.dtos.Enums
{
enum EnumStatut
{
CADRE,
NONCADRE,
ALTERNANT,
STAGIAIRE
}
}

@ -0,0 +1,15 @@
using System.Diagnostics.CodeAnalysis;
namespace espacecollab.backend.infrastructure.sql.dtos
{
public class FonctionDto
{
private Guid Id { get; set; }
private string Name { get; set; }
[ExcludeFromCodeCoverage]
private FonctionDto()
{
}
}
}

@ -0,0 +1,19 @@
using System.Diagnostics.CodeAnalysis;
namespace espacecollab.backend.infrastructure.sql.dtos
{
public class PeriodeEssaiDto
{
private Guid Id { get; set; }
private DateTime StartingDate { get; set; }
private DateTime PlannedEndingDate { get; set; }
private DateTime RealEndingDate { get; set; }
private string Comment { get; set; }
private EnumIssue Issue { get; set; }
[ExcludeFromCodeCoverage]
private PeriodeEssaiDto()
{
}
}
}

@ -0,0 +1,19 @@
using System.Diagnostics.CodeAnalysis;
namespace espacecollab.backend.infrastructure.sql.dtos
{
public class ProjetDto
{
private Guid Id { get; set; }
private string Name { get; set; }
private string Client { get; set; }
private string Description { get; set; }
private DateTime StartingDate { get; set; }
private DateTime EndingDate { get; set; }
[ExcludeFromCodeCoverage]
private ProjetDto()
{
}
}
}

@ -0,0 +1,20 @@
using System;
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace espacecollab.backend.infrastructure.sql.dtos
{
public class ProjetUtiliseTechnologieDto
{
private Guid ProjetId { get; set; }
private Guid TechnologieId { get; set; }
[ExcludeFromCodeCoverage]
private ProjetUtiliseTechnologieDto()
{
}
}
}

@ -0,0 +1,23 @@
using System;
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace espacecollab.backend.infrastructure.sql.dtos
{
public class ReferencementDto
{
private Guid Id { get; set; }
private DateTime StartingDate { get; set; }
private DateTime EndingDate { get; set; }
private Guid ReferredId { get; set; }
private Guid ReferrerId { get; set; }
[ExcludeFromCodeCoverage]
private ReferencementDto()
{
}
}
}

@ -0,0 +1,20 @@
using System;
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace espacecollab.backend.infrastructure.sql.dtos
{
public class SiteDeveloppeProjetDto
{
private Guid SiteId { get; set; }
private Guid ProjetId { get; set; }
[ExcludeFromCodeCoverage]
private SiteDeveloppeProjetDto()
{
}
}
}

@ -0,0 +1,17 @@
using System.Diagnostics.CodeAnalysis;
namespace espacecollab.backend.infrastructure.sql.dtos
{
public class SiteDto
{
private Guid Id { get; set; }
private string Name { get; set; }
private string Address { get; set; }
private Guid BusinessUnitId { get; set; }
[ExcludeFromCodeCoverage]
private SiteDto()
{
}
}
}

@ -0,0 +1,15 @@
using System.Diagnostics.CodeAnalysis;
namespace espacecollab.backend.infrastructure.sql.dtos
{
public class TechnologieDto
{
private Guid Id { get; set; }
private string Name { get; set; }
[ExcludeFromCodeCoverage]
private TechnologieDto()
{
}
}
}

@ -0,0 +1,9 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
</Project>

@ -0,0 +1,152 @@
DROP DATABASE IF EXISTS collaborateur_epa;
CREATE DATABASE IF NOT EXISTS collaborateur_epa /*!40100 DEFAULT CHARACTER SET latin1 */;
USE collaborateur_epa;
DROP TABLE IF EXISTS agence;
CREATE TABLE IF NOT EXISTS agence(
Id int NOT NULL AUTO_INCREMENT,
Name varchar(100) NOT NULL UNIQUE,
PRIMARY KEY (Id)
);
DROP TABLE IF EXISTS business_unit;
CREATE TABLE IF NOT EXISTS business_unit(
Id int NOT NULL AUTO_INCREMENT,
Name varchar(100) NOT NULL UNIQUE,
AgenceId int NOT NULL,
CONSTRAINT FK_BUSINESS_UNIT_AGENCE FOREIGN KEY (AgenceId) references agence(Id),
PRIMARY KEY (Id)
);
DROP TABLE IF EXISTS site;
CREATE TABLE IF NOT EXISTS site(
Id int NOT NULL AUTO_INCREMENT,
Name varchar(100) NOT NULL UNIQUE,
Address varchar(200) NOT NULL,
BusinessUnitId int NOT NULL,
CONSTRAINT FK_SITE_BUSINESS_UNIT FOREIGN KEY (BusinessUnitId) references business_unit(Id),
PRIMARY KEY (Id)
);
DROP TABLE IF EXISTS projet;
CREATE TABLE IF NOT EXISTS projet(
Id int NOT NULL AUTO_INCREMENT,
Name varchar(100) NOT NULL UNIQUE,
Client varchar(100) NOT NULL,
Description varchar(100) NOT NULL,
StartingDate date NOT NULL,
EndingDate date NOT NULL,
PRIMARY KEY (Id)
);
DROP TABLE IF EXISTS technologie;
CREATE TABLE IF NOT EXISTS technologie(
Id int NOT NULL UNIQUE,
Name varchar(100) NOT NULL UNIQUE,
PRIMARY KEY (Id)
);
DROP TABLE IF EXISTS periode_essai;
CREATE TABLE IF NOT EXISTS periode_essai(
Id int NOT NULL AUTO_INCREMENT,
StartingDate date NOT NULL,
PlannedEndingDate date NOT NULL,
RealEndingDate date NOT NULL,
Comment varchar(100) NOT NULL,
Issue ENUM('VALIDEE','PROLONGEE_COLLAB','PROLONGEE_APSIDE','ARRETEE_COLLAB','ARRETEE_APSIDE') NOT NULL,
PRIMARY KEY (Id)
);
DROP TABLE IF EXISTS fonction;
CREATE TABLE IF NOT EXISTS fonction(
Id int NOT NULL UNIQUE,
intitule varchar(100) NOT NULL UNIQUE,
PRIMARY KEY (Id)
);
DROP TABLE IF EXISTS collaborateur;
CREATE TABLE IF NOT EXISTS collaborateur(
Id int NOT NULL AUTO_INCREMENT,
Name varchar(100) NOT NULL UNIQUE,
FirstName varchar(100) NOT NULL,
BirthDate date NOT NULL,
Gender ENUM('MASCULIN','FEMININ','AUTRE') NOT NULL,
Status ENUM('CADRE','NONCADRE','ALTERNANT','STAGIAIRE') NOT NULL,
ChildrenNumber smallint NOT NULL,
Telephone varchar(15) NOT NULL,
PersonalMail varchar(100) NOT NULL,
ApsideMail varchar(100) NOT NULL,
ResignationDate date NOT NULL,
ReferrerId int NOT NULL,
CONSTRAINT FK_COLLABORATEUR_PARRAIN FOREIGN KEY (ReferrerId) REFERENCES collaborateur(Id),
PRIMARY KEY (Id)
);
DROP TABLE IF EXISTS referencement;
CREATE TABLE IF NOT EXISTS referencement(
Id int NOT NULL AUTO_INCREMENT,
StartingDate date NOT NULL,
EndingDate date NOT NULL,
ReferredId int NOT NULL,
ReferrerId int NOT NULL,
CONSTRAINT FK_COLLABORATEUR_REFERE FOREIGN KEY (ReferredId) REFERENCES collaborateur(Id),
CONSTRAINT FK_COLLABORATEUR_REFERENT FOREIGN KEY (ReferrerId) REFERENCES collaborateur(Id),
PRIMARY KEY (Id)
);
DROP TABLE IF EXISTS collaborateur_est_fonction;
CREATE TABLE IF NOT EXISTS collaborateur_est_fonction(
CollaborateurId int NOT NULL,
FonctionId int NOT NULL,
PRIMARY KEY (CollaborateurId,FonctionId),
CONSTRAINT FK_COLLABORATEUR_FONCTION FOREIGN KEY (CollaborateurId) REFERENCES collaborateur(Id),
CONSTRAINT FK_FONCTION_COLLABORATEUR FOREIGN KEY (FonctionId) REFERENCES fonction(Id)
);
DROP TABLE IF EXISTS collaborateur_appartient_business_unit;
CREATE TABLE IF NOT EXISTS collaborateur_appartient_business_unit(
CollaborateurId int NOT NULL,
BusinessUnitId int NOT NULL,
PRIMARY KEY (CollaborateurId,BusinessUnitId),
CONSTRAINT FK_COLLABORATEUR_BUSINESS_UNIT FOREIGN KEY (CollaborateurId) REFERENCES collaborateur(Id),
CONSTRAINT FK_BUSINESS_UNIT_COLLABORATEUR FOREIGN KEY (BusinessUnitId) REFERENCES business_unit(Id)
);
DROP TABLE IF EXISTS collaborateur_effectue_periode_essai;
CREATE TABLE IF NOT EXISTS collaborateur_effectue_periode_essai(
CollaborateurId int NOT NULL,
PeriodeEssaiId int NOT NULL,
PRIMARY KEY (CollaborateurId,PeriodeEssaiId),
CONSTRAINT FK_COLLABORATEUR_PERIODE_ESSAI FOREIGN KEY (CollaborateurId) REFERENCES collaborateur(Id),
CONSTRAINT FK_PERIODE_ESSAI_COLLABORATEUR FOREIGN KEY (PeriodeEssaiId) REFERENCES periode_essai(Id)
);
DROP TABLE IF EXISTS site_developpe_projet;
CREATE TABLE IF NOT EXISTS site_developpe_projet(
SiteId int NOT NULL,
ProjetId int NOT NULL,
PRIMARY KEY (SiteId,ProjetId),
CONSTRAINT FK_SITE_PROJET FOREIGN KEY (SiteId) REFERENCES site(Id),
CONSTRAINT FK_PROJET_SITE FOREIGN KEY (ProjetId) REFERENCES projet(Id)
);
DROP TABLE IF EXISTS projet_utilise_technologie;
CREATE TABLE IF NOT EXISTS projet_utilise_technologie(
ProjetId int NOT NULL,
TechnologieId int NOT NULL,
PRIMARY KEY (ProjetId,TechnologieId),
CONSTRAINT FK_PROJET_TECHNOLOGIE FOREIGN KEY (ProjetId) REFERENCES projet(Id),
CONSTRAINT FK_TECHNOLOGIE_PROJET FOREIGN KEY (TechnologieId) REFERENCES technologie(Id)
);
DROP TABLE IF EXISTS collaborateur_collabore_projet;
CREATE TABLE IF NOT EXISTS collaborateur_collabore_projet(
CollaborateurId int NOT NULL,
ProjetId int NOT NULL,
isManager boolean NOT NULL,
PRIMARY KEY (CollaborateurId,ProjetId),
CONSTRAINT FK_COLLABORATEUR_COLLABORE_PROJET FOREIGN KEY (CollaborateurId) REFERENCES collaborateur(Id),
CONSTRAINT FK_PROJET_COLLABORE_COLLABORATEUR FOREIGN KEY (ProjetId) REFERENCES projet(Id)
);

@ -0,0 +1,9 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
</Project>

@ -0,0 +1,49 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.0.31912.275
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "espacecollab.backend.api", "espacecollab.backend.api\espacecollab.backend.api.csproj", "{A8DEB005-D7E2-4A96-B004-A66BBF12AC54}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "espacecollab.backend.appservices", "espacecollab.backend.appservices\espacecollab.backend.appservices.csproj", "{70F1BE1C-87C1-4CCF-A7E8-2A36F3F16D9E}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "espacecollab.backend.appservices.dtos", "espacecollab.backend.appservices.dtos\espacecollab.backend.appservices.dtos.csproj", "{CB0CB8FC-0E53-4205-AAA3-4176211C922B}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "espacecollab.backend.infrastructure.sql", "espacecollab.backend.infrastructure.sql\espacecollab.backend.infrastructure.sql.csproj", "{590FF09D-0DF3-4881-8D86-E4FDAAC75FDC}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "espacecollab.backend.infrastructure.sql.dtos", "espacecollab.backend.infrastructure.sql.dtos\espacecollab.backend.infrastructure.sql.dtos.csproj", "{26C08CE0-E6E5-4E03-8AEA-233F93218A3B}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{A8DEB005-D7E2-4A96-B004-A66BBF12AC54}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A8DEB005-D7E2-4A96-B004-A66BBF12AC54}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A8DEB005-D7E2-4A96-B004-A66BBF12AC54}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A8DEB005-D7E2-4A96-B004-A66BBF12AC54}.Release|Any CPU.Build.0 = Release|Any CPU
{70F1BE1C-87C1-4CCF-A7E8-2A36F3F16D9E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{70F1BE1C-87C1-4CCF-A7E8-2A36F3F16D9E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{70F1BE1C-87C1-4CCF-A7E8-2A36F3F16D9E}.Release|Any CPU.ActiveCfg = Release|Any CPU
{70F1BE1C-87C1-4CCF-A7E8-2A36F3F16D9E}.Release|Any CPU.Build.0 = Release|Any CPU
{CB0CB8FC-0E53-4205-AAA3-4176211C922B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{CB0CB8FC-0E53-4205-AAA3-4176211C922B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{CB0CB8FC-0E53-4205-AAA3-4176211C922B}.Release|Any CPU.ActiveCfg = Release|Any CPU
{CB0CB8FC-0E53-4205-AAA3-4176211C922B}.Release|Any CPU.Build.0 = Release|Any CPU
{590FF09D-0DF3-4881-8D86-E4FDAAC75FDC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{590FF09D-0DF3-4881-8D86-E4FDAAC75FDC}.Debug|Any CPU.Build.0 = Debug|Any CPU
{590FF09D-0DF3-4881-8D86-E4FDAAC75FDC}.Release|Any CPU.ActiveCfg = Release|Any CPU
{590FF09D-0DF3-4881-8D86-E4FDAAC75FDC}.Release|Any CPU.Build.0 = Release|Any CPU
{26C08CE0-E6E5-4E03-8AEA-233F93218A3B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{26C08CE0-E6E5-4E03-8AEA-233F93218A3B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{26C08CE0-E6E5-4E03-8AEA-233F93218A3B}.Release|Any CPU.ActiveCfg = Release|Any CPU
{26C08CE0-E6E5-4E03-8AEA-233F93218A3B}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {0A56A44C-135E-4CE4-834B-8DFDF69DC415}
EndGlobalSection
EndGlobal
Loading…
Cancel
Save