diff --git a/backend/API/Controllers/AppointmentsController.cs b/backend/API/Controllers/AppointmentsController.cs new file mode 100644 index 0000000..dc10ef5 --- /dev/null +++ b/backend/API/Controllers/AppointmentsController.cs @@ -0,0 +1,38 @@ +using Application.Endpoints; +using Application.Endpoints.Appointments; +using Application.Services.Database; +using Application.Services.Database.MongoDB; +using Microsoft.AspNetCore.Mvc; + +namespace API.Controllers; + +public class AppointmentsController : BaseApiController +{ + private readonly IAppointmentsMongoDbService _appointmentsMongoDbService; + private readonly IPatientRepository _patientRepository; + private readonly IDoctorRepository _doctorRepository; + + public AppointmentsController(IAppointmentsMongoDbService appointmentsMongoDbService, + IPatientRepository patientRepository, IDoctorRepository doctorRepository) + { + _appointmentsMongoDbService = appointmentsMongoDbService; + _patientRepository = patientRepository; + _doctorRepository = doctorRepository; + } + + [HttpPost] + public async Task> CreateAppointment(AppointmentManagementDto dto) + { + var handler = new AppointmentManagementHandler(_appointmentsMongoDbService, _patientRepository, _doctorRepository); + var response = await handler.HandleCreateAppointment(dto).ConfigureAwait(false); + return StatusCode(response.StatusCode, response); + } + + [HttpDelete] + public async Task> DeleteAppointment(AppointmentManagementDto dto) + { + var handler = new AppointmentManagementHandler(_appointmentsMongoDbService, _patientRepository, _doctorRepository); + var response = await handler.HandleDeleteAppointment(dto).ConfigureAwait(false); + return StatusCode(response.StatusCode, response); + } +} \ No newline at end of file diff --git a/backend/API/Controllers/DoctorsController.cs b/backend/API/Controllers/DoctorsController.cs index cdec67d..1d47388 100644 --- a/backend/API/Controllers/DoctorsController.cs +++ b/backend/API/Controllers/DoctorsController.cs @@ -4,6 +4,7 @@ using Application.Endpoints.Doctors.Profile; using Application.Endpoints.Doctors.Registration; using Application.Endpoints.Doctors.ResetPassword; using Application.Services.Database; +using Application.Services.Database.MongoDB; using Application.Services.HashingAlgorithms; using Application.Services.Jwt; using Core.Entities; @@ -18,13 +19,15 @@ public class DoctorsController : ControllerBase private readonly IDoctorRepository _database; private readonly IHashingAlgorithms _hashingAlgorithms; private readonly IJwtService _jwtService; + private readonly IAppointmentsMongoDbService _appointmentsMongoDbService; public DoctorsController(IDoctorRepository database, IHashingAlgorithms hashingAlgorithms, - IJwtService jwtService) + IJwtService jwtService, IAppointmentsMongoDbService appointmentsMongoDbService) { _database = database; _hashingAlgorithms = hashingAlgorithms; _jwtService = jwtService; + _appointmentsMongoDbService = appointmentsMongoDbService; } [HttpPost("register")] @@ -40,6 +43,7 @@ public class DoctorsController : ControllerBase { var handler = new DoctorLoginHandler(_database, _hashingAlgorithms); var response = await handler.Handle(doctorLoginDto).ConfigureAwait(false); + /* if (response.Data != null) { Doctor doctor = (Doctor)response.Data; @@ -47,6 +51,7 @@ public class DoctorsController : ControllerBase HttpContext.Response.Headers.Add("Authorization", $"Bearer {authToken}"); } + */ return StatusCode(response.StatusCode, response); } @@ -125,6 +130,26 @@ public class DoctorsController : ControllerBase { var handler = new DoctorProfileHandler(_database, _hashingAlgorithms); var response = await handler.HandleDelete(id).ConfigureAwait(false); + + if (response.StatusCode < HttpStatusCodes.BadRequest) + { + DeleteDoctorAppointments(id); + } + return StatusCode(response.StatusCode, response); } + + private async void DeleteDoctorAppointments(Guid doctorId) + { + var criteria = new List<(string FieldName, string Value)> + { + ("DoctorId", doctorId.ToString()) + }; + var appointments = await _appointmentsMongoDbService.FindAsync(criteria); + if (!appointments.Any()) + { + return; + } + await _appointmentsMongoDbService.DeleteByIdAsync(appointments[0].Id); + } } \ No newline at end of file diff --git a/backend/API/Controllers/PatientsController.cs b/backend/API/Controllers/PatientsController.cs index d719f74..392e860 100644 --- a/backend/API/Controllers/PatientsController.cs +++ b/backend/API/Controllers/PatientsController.cs @@ -48,6 +48,7 @@ public class PatientsController : ControllerBase { var handler = new PatientLoginHandler(_patientRepository); var response = await handler.Handle(patientLoginDto).ConfigureAwait(false); + /* if (response.Data != null) { Patient patient = (Patient)response.Data; @@ -55,6 +56,7 @@ public class PatientsController : ControllerBase HttpContext.Response.Headers.Add("Authorization", $"Bearer {authToken}"); } + */ return StatusCode(response.StatusCode, response); } diff --git a/backend/API/Program.cs b/backend/API/Program.cs index d68d8ef..22e7d5b 100644 --- a/backend/API/Program.cs +++ b/backend/API/Program.cs @@ -53,18 +53,18 @@ if (app.Environment.IsDevelopment()) app.UseHttpsRedirection(); -builder.Services.AddAuthentication(JwtBearerDefaults.AuthenticationScheme) - .AddJwtBearer(options => - { - options.TokenValidationParameters = new TokenValidationParameters - { - ValidateIssuerSigningKey = true, - IssuerSigningKey = new SymmetricSecurityKey(Encoding.UTF8.GetBytes(builder.Configuration["Jwt:SecretKey"])), - ValidateIssuer = false, - ValidateAudience = false, - ClockSkew = TimeSpan.Zero - }; - }); +//builder.Services.AddAuthentication(JwtBearerDefaults.AuthenticationScheme) +// .AddJwtBearer(options => +// { +// options.TokenValidationParameters = new TokenValidationParameters +// { +// ValidateIssuerSigningKey = true, +// IssuerSigningKey = new SymmetricSecurityKey(Encoding.UTF8.GetBytes(builder.Configuration["Jwt:SecretKey"])), +// ValidateIssuer = false, +// ValidateAudience = false, +// ClockSkew = TimeSpan.Zero +// }; +// }); app.MapControllers(); diff --git a/backend/API/appsettings.json b/backend/API/appsettings.json index a10feee..c5341ab 100644 --- a/backend/API/appsettings.json +++ b/backend/API/appsettings.json @@ -12,7 +12,8 @@ "HealthcareManagerDatabase": { "Name": "HealthcareManager", "MedicalRecordCollectionName": "MedicalHistory", - "ChatCollectionName": "Chat" + "ChatCollectionName": "Chat", + "AppointmentsCollectionName": "Appointments" }, "ApiKeySettings": { "ApiKey": "testapikey" @@ -21,7 +22,7 @@ "SecretKey": "HealthcareManagerJwtKey", "Issuer": "HealthcareManager", "Audience": "HealthCareManagerUsers", - "ExpirationMinutes": 1440 + "ExpirationTime": 1440 }, "AllowedHosts": "*" } diff --git a/backend/API/bin/Debug/net8.0/API.deps.json b/backend/API/bin/Debug/net8.0/API.deps.json index 3f09a94..2dc28ac 100644 --- a/backend/API/bin/Debug/net8.0/API.deps.json +++ b/backend/API/bin/Debug/net8.0/API.deps.json @@ -10,6 +10,7 @@ "dependencies": { "Application": "1.0.0", "Infrastructure": "1.0.0", + "Microsoft.AspNetCore.Authentication.JwtBearer": "8.0.3", "Swashbuckle.AspNetCore": "6.5.0" }, "runtime": { @@ -54,6 +55,17 @@ } } }, + "Microsoft.AspNetCore.Authentication.JwtBearer/8.0.3": { + "dependencies": { + "Microsoft.IdentityModel.Protocols.OpenIdConnect": "7.1.2" + }, + "runtime": { + "lib/net8.0/Microsoft.AspNetCore.Authentication.JwtBearer.dll": { + "assemblyVersion": "8.0.3.0", + "fileVersion": "8.0.324.11615" + } + } + }, "Microsoft.EntityFrameworkCore/8.0.3": { "dependencies": { "Microsoft.EntityFrameworkCore.Abstractions": "8.0.3", @@ -185,6 +197,71 @@ } }, "Microsoft.Extensions.Primitives/8.0.0": {}, + "Microsoft.IdentityModel.Abstractions/7.5.1": { + "runtime": { + "lib/net8.0/Microsoft.IdentityModel.Abstractions.dll": { + "assemblyVersion": "7.5.1.0", + "fileVersion": "7.5.1.50405" + } + } + }, + "Microsoft.IdentityModel.JsonWebTokens/7.5.1": { + "dependencies": { + "Microsoft.IdentityModel.Tokens": "7.5.1" + }, + "runtime": { + "lib/net8.0/Microsoft.IdentityModel.JsonWebTokens.dll": { + "assemblyVersion": "7.5.1.0", + "fileVersion": "7.5.1.50405" + } + } + }, + "Microsoft.IdentityModel.Logging/7.5.1": { + "dependencies": { + "Microsoft.IdentityModel.Abstractions": "7.5.1" + }, + "runtime": { + "lib/net8.0/Microsoft.IdentityModel.Logging.dll": { + "assemblyVersion": "7.5.1.0", + "fileVersion": "7.5.1.50405" + } + } + }, + "Microsoft.IdentityModel.Protocols/7.1.2": { + "dependencies": { + "Microsoft.IdentityModel.Logging": "7.5.1", + "Microsoft.IdentityModel.Tokens": "7.5.1" + }, + "runtime": { + "lib/net8.0/Microsoft.IdentityModel.Protocols.dll": { + "assemblyVersion": "7.1.2.0", + "fileVersion": "7.1.2.41121" + } + } + }, + "Microsoft.IdentityModel.Protocols.OpenIdConnect/7.1.2": { + "dependencies": { + "Microsoft.IdentityModel.Protocols": "7.1.2", + "System.IdentityModel.Tokens.Jwt": "7.5.1" + }, + "runtime": { + "lib/net8.0/Microsoft.IdentityModel.Protocols.OpenIdConnect.dll": { + "assemblyVersion": "7.1.2.0", + "fileVersion": "7.1.2.41121" + } + } + }, + "Microsoft.IdentityModel.Tokens/7.5.1": { + "dependencies": { + "Microsoft.IdentityModel.Logging": "7.5.1" + }, + "runtime": { + "lib/net8.0/Microsoft.IdentityModel.Tokens.dll": { + "assemblyVersion": "7.5.1.0", + "fileVersion": "7.5.1.50405" + } + } + }, "Microsoft.NETCore.Platforms/5.0.0": {}, "Microsoft.OpenApi/1.2.3": { "runtime": { @@ -350,6 +427,18 @@ } }, "System.Buffers/4.5.1": {}, + "System.IdentityModel.Tokens.Jwt/7.5.1": { + "dependencies": { + "Microsoft.IdentityModel.JsonWebTokens": "7.5.1", + "Microsoft.IdentityModel.Tokens": "7.5.1" + }, + "runtime": { + "lib/net8.0/System.IdentityModel.Tokens.Jwt.dll": { + "assemblyVersion": "7.5.1.0", + "fileVersion": "7.5.1.50405" + } + } + }, "System.Memory/4.5.5": {}, "System.Runtime.CompilerServices.Unsafe/5.0.0": {}, "System.Security.AccessControl/5.0.0": { @@ -400,8 +489,10 @@ "Microsoft.Extensions.Configuration": "8.0.0", "Microsoft.Extensions.Configuration.Json": "8.0.0", "Microsoft.Extensions.Options.ConfigurationExtensions": "8.0.0", + "Microsoft.IdentityModel.Tokens": "7.5.1", "MongoDB.Driver": "2.24.0", - "Npgsql.EntityFrameworkCore.PostgreSQL": "8.0.2" + "Npgsql.EntityFrameworkCore.PostgreSQL": "8.0.2", + "System.IdentityModel.Tokens.Jwt": "7.5.1" }, "runtime": { "Infrastructure.dll": {} @@ -443,6 +534,13 @@ "path": "fluentvalidation/11.9.0", "hashPath": "fluentvalidation.11.9.0.nupkg.sha512" }, + "Microsoft.AspNetCore.Authentication.JwtBearer/8.0.3": { + "type": "package", + "serviceable": true, + "sha512": "sha512-VsDy8R6/0ushSpUow7m4lB82ovVBnI1e2AtPo1z22pzYzUjqY9QJvaexzqMkwmI3K1CVdT6MweXiWoqCcHrJbA==", + "path": "microsoft.aspnetcore.authentication.jwtbearer/8.0.3", + "hashPath": "microsoft.aspnetcore.authentication.jwtbearer.8.0.3.nupkg.sha512" + }, "Microsoft.EntityFrameworkCore/8.0.3": { "type": "package", "serviceable": true, @@ -597,6 +695,48 @@ "path": "microsoft.extensions.primitives/8.0.0", "hashPath": "microsoft.extensions.primitives.8.0.0.nupkg.sha512" }, + "Microsoft.IdentityModel.Abstractions/7.5.1": { + "type": "package", + "serviceable": true, + "sha512": "sha512-PT16ZFbPIiMsYv07oy3zOjqUOJ7xutGBkJTOX0+IbNyU6+O6X7aIxjq9EaSSRLWbekRgamgtmfg8Xjw6A6Ua9g==", + "path": "microsoft.identitymodel.abstractions/7.5.1", + "hashPath": "microsoft.identitymodel.abstractions.7.5.1.nupkg.sha512" + }, + "Microsoft.IdentityModel.JsonWebTokens/7.5.1": { + "type": "package", + "serviceable": true, + "sha512": "sha512-93CGSa8RPdZU8zfvA3nf9NGKUqEnQrE12VzYlMqKh72ddhzusosqLNEUgH/YhFWBLRFOnY1RCgHMV7pR+sAx2w==", + "path": "microsoft.identitymodel.jsonwebtokens/7.5.1", + "hashPath": "microsoft.identitymodel.jsonwebtokens.7.5.1.nupkg.sha512" + }, + "Microsoft.IdentityModel.Logging/7.5.1": { + "type": "package", + "serviceable": true, + "sha512": "sha512-PnpAQX20BAiDIPYmWUyQSlEaWD8BLXzHpiDGTCT568Cs0ReOeyzNe401LzCeiv6ilug/KefVeV1CeqtCHTo8dw==", + "path": "microsoft.identitymodel.logging/7.5.1", + "hashPath": "microsoft.identitymodel.logging.7.5.1.nupkg.sha512" + }, + "Microsoft.IdentityModel.Protocols/7.1.2": { + "type": "package", + "serviceable": true, + "sha512": "sha512-SydLwMRFx6EHPWJ+N6+MVaoArN1Htt92b935O3RUWPY1yUF63zEjvd3lBu79eWdZUwedP8TN2I5V9T3nackvIQ==", + "path": "microsoft.identitymodel.protocols/7.1.2", + "hashPath": "microsoft.identitymodel.protocols.7.1.2.nupkg.sha512" + }, + "Microsoft.IdentityModel.Protocols.OpenIdConnect/7.1.2": { + "type": "package", + "serviceable": true, + "sha512": "sha512-6lHQoLXhnMQ42mGrfDkzbIOR3rzKM1W1tgTeMPLgLCqwwGw0d96xFi/UiX/fYsu7d6cD5MJiL3+4HuI8VU+sVQ==", + "path": "microsoft.identitymodel.protocols.openidconnect/7.1.2", + "hashPath": "microsoft.identitymodel.protocols.openidconnect.7.1.2.nupkg.sha512" + }, + "Microsoft.IdentityModel.Tokens/7.5.1": { + "type": "package", + "serviceable": true, + "sha512": "sha512-Q3DKpyFViP84IUlTFKH/zIkswIrmSh2Vd/eFDo4wlOHy4DYxoweZEEw4kDEiKt9VCX6o7SddK3HK2xDYyFpexA==", + "path": "microsoft.identitymodel.tokens/7.5.1", + "hashPath": "microsoft.identitymodel.tokens.7.5.1.nupkg.sha512" + }, "Microsoft.NETCore.Platforms/5.0.0": { "type": "package", "serviceable": true, @@ -709,6 +849,13 @@ "path": "system.buffers/4.5.1", "hashPath": "system.buffers.4.5.1.nupkg.sha512" }, + "System.IdentityModel.Tokens.Jwt/7.5.1": { + "type": "package", + "serviceable": true, + "sha512": "sha512-UUw+E0R73lZLlXgneYIJQxNs1kfbcxjVzw64JQyiwjqCd4HMpAbjn+xRo86QZT84uHq8/MkqvfH82tgjgPzpuw==", + "path": "system.identitymodel.tokens.jwt/7.5.1", + "hashPath": "system.identitymodel.tokens.jwt.7.5.1.nupkg.sha512" + }, "System.Memory/4.5.5": { "type": "package", "serviceable": true, diff --git a/backend/API/bin/Debug/net8.0/API.dll b/backend/API/bin/Debug/net8.0/API.dll index 97022a5..ed4ef89 100644 Binary files a/backend/API/bin/Debug/net8.0/API.dll and b/backend/API/bin/Debug/net8.0/API.dll differ diff --git a/backend/API/bin/Debug/net8.0/API.exe b/backend/API/bin/Debug/net8.0/API.exe index cf6299a..fb8fa4b 100644 Binary files a/backend/API/bin/Debug/net8.0/API.exe and b/backend/API/bin/Debug/net8.0/API.exe differ diff --git a/backend/API/bin/Debug/net8.0/API.pdb b/backend/API/bin/Debug/net8.0/API.pdb index fe98228..56016df 100644 Binary files a/backend/API/bin/Debug/net8.0/API.pdb and b/backend/API/bin/Debug/net8.0/API.pdb differ diff --git a/backend/API/bin/Debug/net8.0/Application.dll b/backend/API/bin/Debug/net8.0/Application.dll index ac54dcf..da45137 100644 Binary files a/backend/API/bin/Debug/net8.0/Application.dll and b/backend/API/bin/Debug/net8.0/Application.dll differ diff --git a/backend/API/bin/Debug/net8.0/Application.pdb b/backend/API/bin/Debug/net8.0/Application.pdb index 582da16..c858089 100644 Binary files a/backend/API/bin/Debug/net8.0/Application.pdb and b/backend/API/bin/Debug/net8.0/Application.pdb differ diff --git a/backend/API/bin/Debug/net8.0/Core.dll b/backend/API/bin/Debug/net8.0/Core.dll index 62444bc..f766e5c 100644 Binary files a/backend/API/bin/Debug/net8.0/Core.dll and b/backend/API/bin/Debug/net8.0/Core.dll differ diff --git a/backend/API/bin/Debug/net8.0/Core.pdb b/backend/API/bin/Debug/net8.0/Core.pdb index be53c18..d8cfb2d 100644 Binary files a/backend/API/bin/Debug/net8.0/Core.pdb and b/backend/API/bin/Debug/net8.0/Core.pdb differ diff --git a/backend/API/bin/Debug/net8.0/Infrastructure.dll b/backend/API/bin/Debug/net8.0/Infrastructure.dll index 589a16f..41780ac 100644 Binary files a/backend/API/bin/Debug/net8.0/Infrastructure.dll and b/backend/API/bin/Debug/net8.0/Infrastructure.dll differ diff --git a/backend/API/bin/Debug/net8.0/Infrastructure.pdb b/backend/API/bin/Debug/net8.0/Infrastructure.pdb index b2032af..e81a910 100644 Binary files a/backend/API/bin/Debug/net8.0/Infrastructure.pdb and b/backend/API/bin/Debug/net8.0/Infrastructure.pdb differ diff --git a/backend/API/bin/Debug/net8.0/Microsoft.AspNetCore.Authentication.JwtBearer.dll b/backend/API/bin/Debug/net8.0/Microsoft.AspNetCore.Authentication.JwtBearer.dll new file mode 100644 index 0000000..21bdd35 Binary files /dev/null and b/backend/API/bin/Debug/net8.0/Microsoft.AspNetCore.Authentication.JwtBearer.dll differ diff --git a/backend/API/bin/Debug/net8.0/Microsoft.IdentityModel.Abstractions.dll b/backend/API/bin/Debug/net8.0/Microsoft.IdentityModel.Abstractions.dll new file mode 100644 index 0000000..110051f Binary files /dev/null and b/backend/API/bin/Debug/net8.0/Microsoft.IdentityModel.Abstractions.dll differ diff --git a/backend/API/bin/Debug/net8.0/Microsoft.IdentityModel.JsonWebTokens.dll b/backend/API/bin/Debug/net8.0/Microsoft.IdentityModel.JsonWebTokens.dll new file mode 100644 index 0000000..6d1c915 Binary files /dev/null and b/backend/API/bin/Debug/net8.0/Microsoft.IdentityModel.JsonWebTokens.dll differ diff --git a/backend/API/bin/Debug/net8.0/Microsoft.IdentityModel.Logging.dll b/backend/API/bin/Debug/net8.0/Microsoft.IdentityModel.Logging.dll new file mode 100644 index 0000000..c61af6f Binary files /dev/null and b/backend/API/bin/Debug/net8.0/Microsoft.IdentityModel.Logging.dll differ diff --git a/backend/API/bin/Debug/net8.0/Microsoft.IdentityModel.Protocols.OpenIdConnect.dll b/backend/API/bin/Debug/net8.0/Microsoft.IdentityModel.Protocols.OpenIdConnect.dll new file mode 100644 index 0000000..fed943a Binary files /dev/null and b/backend/API/bin/Debug/net8.0/Microsoft.IdentityModel.Protocols.OpenIdConnect.dll differ diff --git a/backend/API/bin/Debug/net8.0/Microsoft.IdentityModel.Protocols.dll b/backend/API/bin/Debug/net8.0/Microsoft.IdentityModel.Protocols.dll new file mode 100644 index 0000000..da9cab0 Binary files /dev/null and b/backend/API/bin/Debug/net8.0/Microsoft.IdentityModel.Protocols.dll differ diff --git a/backend/API/bin/Debug/net8.0/Microsoft.IdentityModel.Tokens.dll b/backend/API/bin/Debug/net8.0/Microsoft.IdentityModel.Tokens.dll new file mode 100644 index 0000000..2d1a4a9 Binary files /dev/null and b/backend/API/bin/Debug/net8.0/Microsoft.IdentityModel.Tokens.dll differ diff --git a/backend/API/bin/Debug/net8.0/System.IdentityModel.Tokens.Jwt.dll b/backend/API/bin/Debug/net8.0/System.IdentityModel.Tokens.Jwt.dll new file mode 100644 index 0000000..e30037c Binary files /dev/null and b/backend/API/bin/Debug/net8.0/System.IdentityModel.Tokens.Jwt.dll differ diff --git a/backend/API/bin/Debug/net8.0/appsettings.json b/backend/API/bin/Debug/net8.0/appsettings.json index 41a5cdc..c5341ab 100644 --- a/backend/API/bin/Debug/net8.0/appsettings.json +++ b/backend/API/bin/Debug/net8.0/appsettings.json @@ -12,10 +12,17 @@ "HealthcareManagerDatabase": { "Name": "HealthcareManager", "MedicalRecordCollectionName": "MedicalHistory", - "ChatCollectionName": "Chat" + "ChatCollectionName": "Chat", + "AppointmentsCollectionName": "Appointments" }, "ApiKeySettings": { "ApiKey": "testapikey" }, + "Jwt": { + "SecretKey": "HealthcareManagerJwtKey", + "Issuer": "HealthcareManager", + "Audience": "HealthCareManagerUsers", + "ExpirationTime": 1440 + }, "AllowedHosts": "*" } diff --git a/backend/API/obj/Debug/net8.0/API.AssemblyInfo.cs b/backend/API/obj/Debug/net8.0/API.AssemblyInfo.cs index cbf00a7..074e0e2 100644 --- a/backend/API/obj/Debug/net8.0/API.AssemblyInfo.cs +++ b/backend/API/obj/Debug/net8.0/API.AssemblyInfo.cs @@ -13,7 +13,7 @@ using System.Reflection; [assembly: System.Reflection.AssemblyCompanyAttribute("API")] [assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")] [assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")] -[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+116405bd75830f3dec1c68562965bc78967039d5")] +[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+8663a186a056b0dfbfeebf9ae16be42b40101093")] [assembly: System.Reflection.AssemblyProductAttribute("API")] [assembly: System.Reflection.AssemblyTitleAttribute("API")] [assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")] diff --git a/backend/API/obj/Debug/net8.0/API.AssemblyInfoInputs.cache b/backend/API/obj/Debug/net8.0/API.AssemblyInfoInputs.cache index 4860f19..5ad68cc 100644 --- a/backend/API/obj/Debug/net8.0/API.AssemblyInfoInputs.cache +++ b/backend/API/obj/Debug/net8.0/API.AssemblyInfoInputs.cache @@ -1 +1 @@ -cef1c0cc4ccce44108fa880ecec8ba436aa9584f61400f2f44f2970c2d6842dc +a61f57beead854c5be97ca0cf9336ea23b19a3b596fd07a95a410574950b1887 diff --git a/backend/API/obj/Debug/net8.0/API.csproj.AssemblyReference.cache b/backend/API/obj/Debug/net8.0/API.csproj.AssemblyReference.cache index 1c1e8a4..051cb8a 100644 Binary files a/backend/API/obj/Debug/net8.0/API.csproj.AssemblyReference.cache and b/backend/API/obj/Debug/net8.0/API.csproj.AssemblyReference.cache differ diff --git a/backend/API/obj/Debug/net8.0/API.csproj.CoreCompileInputs.cache b/backend/API/obj/Debug/net8.0/API.csproj.CoreCompileInputs.cache index 3f83bc6..3367bf6 100644 --- a/backend/API/obj/Debug/net8.0/API.csproj.CoreCompileInputs.cache +++ b/backend/API/obj/Debug/net8.0/API.csproj.CoreCompileInputs.cache @@ -1 +1 @@ -06fc5bd1554959a9b32bbdb9ef6b3f86b090ac26bcc67914d438a39ee322e613 +8e2d63c970dcfcf7fa32f83c388855a8383f3ed35cc314f5089a54d4a7d74fa6 diff --git a/backend/API/obj/Debug/net8.0/API.csproj.FileListAbsolute.txt b/backend/API/obj/Debug/net8.0/API.csproj.FileListAbsolute.txt index 6c3a329..a05d6c6 100644 --- a/backend/API/obj/Debug/net8.0/API.csproj.FileListAbsolute.txt +++ b/backend/API/obj/Debug/net8.0/API.csproj.FileListAbsolute.txt @@ -56,3 +56,11 @@ C:\Users\Andrei Cerbu\Documents\FACULTATE\CC-FinalProj\backend\API\bin\Debug\net C:\Users\Andrei Cerbu\Documents\FACULTATE\CC-FinalProj\backend\API\bin\Debug\net8.0\FluentValidation.dll C:\Users\Andrei Cerbu\Documents\FACULTATE\CC-FinalProj\backend\API\bin\Debug\net8.0\Application.dll C:\Users\Andrei Cerbu\Documents\FACULTATE\CC-FinalProj\backend\API\bin\Debug\net8.0\Application.pdb +C:\Users\Andrei Cerbu\Documents\FACULTATE\CC-FinalProj\backend\API\bin\Debug\net8.0\Microsoft.AspNetCore.Authentication.JwtBearer.dll +C:\Users\Andrei Cerbu\Documents\FACULTATE\CC-FinalProj\backend\API\bin\Debug\net8.0\Microsoft.IdentityModel.Abstractions.dll +C:\Users\Andrei Cerbu\Documents\FACULTATE\CC-FinalProj\backend\API\bin\Debug\net8.0\Microsoft.IdentityModel.JsonWebTokens.dll +C:\Users\Andrei Cerbu\Documents\FACULTATE\CC-FinalProj\backend\API\bin\Debug\net8.0\Microsoft.IdentityModel.Logging.dll +C:\Users\Andrei Cerbu\Documents\FACULTATE\CC-FinalProj\backend\API\bin\Debug\net8.0\Microsoft.IdentityModel.Protocols.dll +C:\Users\Andrei Cerbu\Documents\FACULTATE\CC-FinalProj\backend\API\bin\Debug\net8.0\Microsoft.IdentityModel.Protocols.OpenIdConnect.dll +C:\Users\Andrei Cerbu\Documents\FACULTATE\CC-FinalProj\backend\API\bin\Debug\net8.0\Microsoft.IdentityModel.Tokens.dll +C:\Users\Andrei Cerbu\Documents\FACULTATE\CC-FinalProj\backend\API\bin\Debug\net8.0\System.IdentityModel.Tokens.Jwt.dll diff --git a/backend/API/obj/Debug/net8.0/API.dll b/backend/API/obj/Debug/net8.0/API.dll index 97022a5..ed4ef89 100644 Binary files a/backend/API/obj/Debug/net8.0/API.dll and b/backend/API/obj/Debug/net8.0/API.dll differ diff --git a/backend/API/obj/Debug/net8.0/API.pdb b/backend/API/obj/Debug/net8.0/API.pdb index fe98228..56016df 100644 Binary files a/backend/API/obj/Debug/net8.0/API.pdb and b/backend/API/obj/Debug/net8.0/API.pdb differ diff --git a/backend/API/obj/Debug/net8.0/API.sourcelink.json b/backend/API/obj/Debug/net8.0/API.sourcelink.json index 84ecd88..bb69c3e 100644 --- a/backend/API/obj/Debug/net8.0/API.sourcelink.json +++ b/backend/API/obj/Debug/net8.0/API.sourcelink.json @@ -1 +1 @@ -{"documents":{"C:\\Users\\Andrei Cerbu\\Documents\\FACULTATE\\CC-FinalProj\\*":"https://raw.githubusercontent.com/andrei-mihnea-cerbu/CC-FinalProj/48eb2adcbd149cd66c77ba558f492179d2bf29be/*"}} \ No newline at end of file +{"documents":{"C:\\Users\\Andrei Cerbu\\Documents\\FACULTATE\\CC-FinalProj\\*":"https://raw.githubusercontent.com/andrei-mihnea-cerbu/CC-FinalProj/8663a186a056b0dfbfeebf9ae16be42b40101093/*"}} \ No newline at end of file diff --git a/backend/API/obj/Debug/net8.0/apphost.exe b/backend/API/obj/Debug/net8.0/apphost.exe index cf6299a..fb8fa4b 100644 Binary files a/backend/API/obj/Debug/net8.0/apphost.exe and b/backend/API/obj/Debug/net8.0/apphost.exe differ diff --git a/backend/API/obj/Debug/net8.0/ref/API.dll b/backend/API/obj/Debug/net8.0/ref/API.dll index dc0a122..a045dde 100644 Binary files a/backend/API/obj/Debug/net8.0/ref/API.dll and b/backend/API/obj/Debug/net8.0/ref/API.dll differ diff --git a/backend/API/obj/Debug/net8.0/refint/API.dll b/backend/API/obj/Debug/net8.0/refint/API.dll index dc0a122..a045dde 100644 Binary files a/backend/API/obj/Debug/net8.0/refint/API.dll and b/backend/API/obj/Debug/net8.0/refint/API.dll differ diff --git a/backend/Application/Endpoints/Appointments/AppointmentManagementDto.cs b/backend/Application/Endpoints/Appointments/AppointmentManagementDto.cs new file mode 100644 index 0000000..63d4e4b --- /dev/null +++ b/backend/Application/Endpoints/Appointments/AppointmentManagementDto.cs @@ -0,0 +1,8 @@ +namespace Application.Endpoints.Appointments; + +public class AppointmentManagementDto +{ + public Guid DoctorId { get; set; } + public Guid PatientId { get; set; } + public DateTime Appointment { get; set; } +} \ No newline at end of file diff --git a/backend/Application/Endpoints/Appointments/AppointmentManagementHandler.cs b/backend/Application/Endpoints/Appointments/AppointmentManagementHandler.cs new file mode 100644 index 0000000..2a9dc99 --- /dev/null +++ b/backend/Application/Endpoints/Appointments/AppointmentManagementHandler.cs @@ -0,0 +1,121 @@ +using Application.Services.Database; +using Application.Services.Database.MongoDB; +using Core.Entities; + +namespace Application.Endpoints.Appointments; + +public class AppointmentManagementHandler +{ + private readonly IAppointmentsMongoDbService _appointmentsMongoDbService; + private readonly IPatientRepository _patientRepository; + private readonly IDoctorRepository _doctorRepository; + + public AppointmentManagementHandler(IAppointmentsMongoDbService appointmentsMongoDbService, + IPatientRepository patientRepository, IDoctorRepository doctorRepository) + { + _appointmentsMongoDbService = appointmentsMongoDbService; + _patientRepository = patientRepository; + _doctorRepository = doctorRepository; + } + + public async Task HandleCreateAppointment(AppointmentManagementDto dto) + { + var validation = new CreateAppointmentValidator(_appointmentsMongoDbService, + _doctorRepository, _patientRepository); + var validationResult = await validation.ValidateAsync(dto); + + if (!validationResult.IsValid) + { + var firstError = validationResult.Errors.FirstOrDefault(); + var errorCode = int.TryParse(firstError.ErrorCode, out var code) ? code : -1; + var errorMessage = firstError.ErrorMessage; + + return new BaseResponse + { + StatusCode = errorCode, + Message = errorMessage, + Data = null + }; + } + + var appointmentId = IdentifierGenerator.GenerateId(dto.DoctorId, dto.PatientId); + var criteria = new List<(string FieldName, string Value)> + { + ("_id", appointmentId), + }; + var appointments = await _appointmentsMongoDbService.FindAsync(criteria); + + if(!appointments.Any()) + { + var appointment = new Appointment(); + appointment.SetId(appointmentId); + appointment.SetDoctorIid(dto.DoctorId.ToString()); + appointment.SetPatientId(dto.PatientId.ToString()); + appointment.AddAppointment(dto.Appointment); + + await _appointmentsMongoDbService.AddAsync(appointment); + } + else + { + var appointment = appointments[0]; + appointment.AddAppointment(dto.Appointment); + await _appointmentsMongoDbService.ModifyAsync("_id", appointmentId, appointment); + } + + return new BaseResponse() + { + StatusCode = HttpStatusCodes.Created, + Message = "Appointment successfully created.", + Data = null + }; + } + + public async Task HandleDeleteAppointment(AppointmentManagementDto dto) + { + var validation = new DeleteAppointmentValidator(_appointmentsMongoDbService, + _doctorRepository, _patientRepository); + var validationResult = await validation.ValidateAsync(dto); + + if (!validationResult.IsValid) + { + var firstError = validationResult.Errors.FirstOrDefault(); + var errorCode = int.TryParse(firstError.ErrorCode, out var code) ? code : -1; + var errorMessage = firstError.ErrorMessage; + + return new BaseResponse + { + StatusCode = errorCode, + Message = errorMessage, + Data = null + }; + } + + var appointmentId = IdentifierGenerator.GenerateId(dto.DoctorId, dto.PatientId); + var criteria = new List<(string FieldName, string Value)> + { + ("_id", appointmentId), + }; + var appointments = await _appointmentsMongoDbService.FindAsync(criteria); + + if(!appointments.Any()) + { + return new BaseResponse() + { + StatusCode = HttpStatusCodes.NotFound, + Message = "Appointment not found in system.", + Data = null + }; + } + + var appointment = appointments[0]; + appointment.RemoveAppointment(dto.Appointment); + await _appointmentsMongoDbService.ModifyAsync("_id", appointmentId, appointment); + + return new BaseResponse() + { + StatusCode = HttpStatusCodes.OK, + Message = "Appointment successfully removed.", + Data = null + }; + } +} \ No newline at end of file diff --git a/backend/Application/Endpoints/Appointments/CreateAppointmentValidator.cs b/backend/Application/Endpoints/Appointments/CreateAppointmentValidator.cs new file mode 100644 index 0000000..4e90462 --- /dev/null +++ b/backend/Application/Endpoints/Appointments/CreateAppointmentValidator.cs @@ -0,0 +1,66 @@ +using Application.Services.Database; +using Application.Services.Database.MongoDB; +using FluentValidation; + +namespace Application.Endpoints.Appointments; + +public class CreateAppointmentValidator : AbstractValidator +{ + private readonly IAppointmentsMongoDbService _appointmentsMongoDbService; + private readonly IDoctorRepository _doctorRepository; + private readonly IPatientRepository _patientRepository; + + public CreateAppointmentValidator(IAppointmentsMongoDbService appointmentsMongoDbService, + IDoctorRepository doctorRepository, IPatientRepository patientRepository) + { + RuleFor(x => x.DoctorId) + .NotEmpty().WithMessage("Id is required.").WithErrorCode(HttpStatusCodes.BadRequest.ToString()) + .MustAsync(IsDoctorRegistered).WithMessage("Doctor is not registered in system") + .WithErrorCode(HttpStatusCodes.NotFound.ToString()); + + RuleFor(x => x.PatientId) + .NotEmpty().WithMessage("Id is required.").WithErrorCode(HttpStatusCodes.BadRequest.ToString()) + .MustAsync(IsPatientRegistered).WithMessage("Patient is not registered in system") + .WithErrorCode(HttpStatusCodes.NotFound.ToString()); + + RuleFor(x => x.Appointment) + .Must(IsAppointmentValidFormat).WithMessage("Appointment is not valid") + .WithErrorCode(HttpStatusCodes.BadRequest.ToString()); + + RuleFor(x => x) + .MustAsync(IsAppointmentUnique).WithMessage("Appointment already in system.") + .WithErrorCode(HttpStatusCodes.Conflict.ToString()); + + _appointmentsMongoDbService = appointmentsMongoDbService; + _doctorRepository = doctorRepository; + _patientRepository = patientRepository; + } + + private async Task IsDoctorRegistered(Guid id, CancellationToken cancellationToken) + { + var doctor = await _doctorRepository.GetByIdAsync(id); + return doctor != null; + } + + private async Task IsPatientRegistered(Guid id, CancellationToken cancellationToken) + { + var patient = await _patientRepository.GetByIdAsync(id); + return patient != null; + } + + private bool IsAppointmentValidFormat(DateTime appointment) + { + if (appointment == default(DateTime)) + return false; + + if (appointment.Date < DateTime.UtcNow.Date) + return false; + + return true; + } + + private async Task IsAppointmentUnique(AppointmentManagementDto dto, CancellationToken cancellationToken) + { + return await _appointmentsMongoDbService.IsAppointmentUnique(dto); + } +} \ No newline at end of file diff --git a/backend/Application/Endpoints/Appointments/DeleteAppointmentValidator.cs b/backend/Application/Endpoints/Appointments/DeleteAppointmentValidator.cs new file mode 100644 index 0000000..02e9e16 --- /dev/null +++ b/backend/Application/Endpoints/Appointments/DeleteAppointmentValidator.cs @@ -0,0 +1,67 @@ +using Application.Services.Database; +using Application.Services.Database.MongoDB; +using Core.Entities; +using FluentValidation; + +namespace Application.Endpoints.Appointments; + +public class DeleteAppointmentValidator : AbstractValidator +{ + private readonly IAppointmentsMongoDbService _appointmentsMongoDbService; + private readonly IDoctorRepository _doctorRepository; + private readonly IPatientRepository _patientRepository; + + public DeleteAppointmentValidator(IAppointmentsMongoDbService appointmentsMongoDbService, + IDoctorRepository doctorRepository, IPatientRepository patientRepository) + { + RuleFor(x => x.DoctorId) + .NotEmpty().WithMessage("Id is required.").WithErrorCode(HttpStatusCodes.BadRequest.ToString()) + .MustAsync(IsDoctorRegistered).WithMessage("Doctor is not registered in system") + .WithErrorCode(HttpStatusCodes.NotFound.ToString()); + + RuleFor(x => x.PatientId) + .NotEmpty().WithMessage("Id is required.").WithErrorCode(HttpStatusCodes.BadRequest.ToString()) + .MustAsync(IsPatientRegistered).WithMessage("Patient is not registered in system") + .WithErrorCode(HttpStatusCodes.NotFound.ToString()); + + RuleFor(x => x.Appointment) + .Must(IsAppointmentValidFormat).WithMessage("Appointment is not valid") + .WithErrorCode(HttpStatusCodes.BadRequest.ToString()); + + RuleFor(x => x) + .MustAsync(DoesAppointmentExists).WithMessage("Appointment not found in system") + .WithErrorCode(HttpStatusCodes.NotFound.ToString()); + + _appointmentsMongoDbService = appointmentsMongoDbService; + _doctorRepository = doctorRepository; + _patientRepository = patientRepository; + } + + private async Task IsDoctorRegistered(Guid id, CancellationToken cancellationToken) + { + var doctor = await _doctorRepository.GetByIdAsync(id); + return doctor != null; + } + + private async Task IsPatientRegistered(Guid id, CancellationToken cancellationToken) + { + var patient = await _patientRepository.GetByIdAsync(id); + return patient != null; + } + + private bool IsAppointmentValidFormat(DateTime appointment) + { + if (appointment == default(DateTime)) + return false; + + if (appointment.Date < DateTime.UtcNow.Date) + return false; + + return true; + } + + private async Task DoesAppointmentExists(AppointmentManagementDto dto, CancellationToken cancellationToken) + { + return await _appointmentsMongoDbService.DoesAppointmentExists(dto); + } +} \ No newline at end of file diff --git a/backend/Application/Endpoints/Chats/ChatHandler.cs b/backend/Application/Endpoints/Chats/ChatHandler.cs index 5f5bdbc..06ef02d 100644 --- a/backend/Application/Endpoints/Chats/ChatHandler.cs +++ b/backend/Application/Endpoints/Chats/ChatHandler.cs @@ -47,7 +47,7 @@ public class ChatHandler }; } - var chatId = ChatIdentifier.GenerateChatId(sendMessageDto.Sender, sendMessageDto.Receiver); + var chatId = IdentifierGenerator.GenerateId(sendMessageDto.Sender, sendMessageDto.Receiver); var criteria = new List<(string, string)>(); criteria.Add(("_id", chatId)); @@ -109,7 +109,7 @@ public class ChatHandler }; } - var chatId = ChatIdentifier.GenerateChatId(getConversationDto.IdUser1, getConversationDto.IdUser2); + var chatId = IdentifierGenerator.GenerateId(getConversationDto.IdUser1, getConversationDto.IdUser2); var criteria = new List<(string, string)>(); criteria.Add(("_id", chatId)); diff --git a/backend/Application/Endpoints/Doctors/Profile/DoctorProfileValidation.cs b/backend/Application/Endpoints/Doctors/Profile/DoctorProfileValidation.cs index f9c4fd6..b9f09b8 100644 --- a/backend/Application/Endpoints/Doctors/Profile/DoctorProfileValidation.cs +++ b/backend/Application/Endpoints/Doctors/Profile/DoctorProfileValidation.cs @@ -13,7 +13,7 @@ public class DoctorProfileValidation : AbstractValidator RuleFor(x => x.Id) .NotEmpty().WithMessage("Id is required.").WithErrorCode(HttpStatusCodes.BadRequest.ToString()) - .MustAsync(IsDoctorRegistered).WithMessage("Doctor is registered in system") + .MustAsync(IsDoctorRegistered).WithMessage("Doctor is not registered in system") .WithErrorCode(HttpStatusCodes.NotFound.ToString()); RuleFor(x => x.Email) @@ -40,7 +40,7 @@ public class DoctorProfileValidation : AbstractValidator private async Task IsDoctorRegistered(Guid id, CancellationToken cancellationToken) { var doctor = await _doctorRepository.GetByIdAsync(id); - return doctor == null; + return doctor != null; } private async Task BeUniqueEmail(string email, CancellationToken cancellationToken) diff --git a/backend/Application/Endpoints/Chats/ChatIdentifier.cs b/backend/Application/Endpoints/IdentifierGenerator.cs similarity index 75% rename from backend/Application/Endpoints/Chats/ChatIdentifier.cs rename to backend/Application/Endpoints/IdentifierGenerator.cs index d391338..6a0f500 100644 --- a/backend/Application/Endpoints/Chats/ChatIdentifier.cs +++ b/backend/Application/Endpoints/IdentifierGenerator.cs @@ -1,8 +1,8 @@ -namespace Application.Endpoints.Chats; +namespace Application.Endpoints; -public class ChatIdentifier +public class IdentifierGenerator { - public static string GenerateChatId(Guid id1, Guid id2) + public static string GenerateId(Guid id1, Guid id2) { // Convert GUIDs to strings string strId1 = id1.ToString(); diff --git a/backend/Application/Endpoints/MedicalHistories/FileManagement/MedicalHistoryFileManagementHandler.cs b/backend/Application/Endpoints/MedicalHistories/FileManagement/MedicalHistoryFileManagementHandler.cs index 0bd348c..974df35 100644 --- a/backend/Application/Endpoints/MedicalHistories/FileManagement/MedicalHistoryFileManagementHandler.cs +++ b/backend/Application/Endpoints/MedicalHistories/FileManagement/MedicalHistoryFileManagementHandler.cs @@ -31,7 +31,7 @@ public class MedicalHistoryFileManagementHandler return new BaseResponse { - StatusCode = HttpStatusCodes.NoContent, + StatusCode = HttpStatusCodes.NotFound, Message = "Medical histories not found", Data = null }; diff --git a/backend/Application/Endpoints/Patients/Profile/PatientProfileValidation.cs b/backend/Application/Endpoints/Patients/Profile/PatientProfileValidation.cs index 8602d60..00b73c4 100644 --- a/backend/Application/Endpoints/Patients/Profile/PatientProfileValidation.cs +++ b/backend/Application/Endpoints/Patients/Profile/PatientProfileValidation.cs @@ -13,7 +13,7 @@ public class PatientProfileValidation : AbstractValidator RuleFor(x => x.Id) .NotEmpty().WithMessage("Id is required.").WithErrorCode(HttpStatusCodes.BadRequest.ToString()) - .MustAsync(IsPatientRegistered).WithMessage("Patient is registered in system") + .MustAsync(IsPatientRegistered).WithMessage("Patient is not registered in system") .WithErrorCode(HttpStatusCodes.NotFound.ToString()); RuleFor(x => x.Email) @@ -35,8 +35,8 @@ public class PatientProfileValidation : AbstractValidator private async Task IsPatientRegistered(Guid id, CancellationToken cancellationToken) { - var doctor = await _patientRepository.GetByIdAsync(id); - return doctor == null; + var patient = await _patientRepository.GetByIdAsync(id); + return patient != null; } private async Task BeUniqueEmail(string email, CancellationToken cancellationToken) diff --git a/backend/Application/Services/Database/MongoDB/IAppointmentsHistoryMongoDbService.cs b/backend/Application/Services/Database/MongoDB/IAppointmentsHistoryMongoDbService.cs new file mode 100644 index 0000000..c501266 --- /dev/null +++ b/backend/Application/Services/Database/MongoDB/IAppointmentsHistoryMongoDbService.cs @@ -0,0 +1,23 @@ +using Application.Endpoints.Appointments; +using MongoDB.Driver; + +namespace Application.Services.Database.MongoDB; + +public interface IAppointmentsMongoDbService +{ + IMongoCollection GetCollection(); + + Task> FindAsync(List<(string FieldName, string Value)> criteria); + + Task AddAsync(T document); + + Task ModifyAsync(string keyField, string keyValue, T document); + + Task DeleteAsync(string keyField, string keyValue); + + Task DeleteByIdAsync(string id); + + public Task IsAppointmentUnique(AppointmentManagementDto dto); + + public Task DoesAppointmentExists(AppointmentManagementDto dto); +} \ No newline at end of file diff --git a/backend/Application/Services/Database/MongoDB/IChatHistoryMongoDbService.cs b/backend/Application/Services/Database/MongoDB/IChatHistoryMongoDbService.cs index af6f006..6da1a0b 100644 --- a/backend/Application/Services/Database/MongoDB/IChatHistoryMongoDbService.cs +++ b/backend/Application/Services/Database/MongoDB/IChatHistoryMongoDbService.cs @@ -13,4 +13,6 @@ public interface IChatMongoDbService Task ModifyAsync(string keyField, string keyValue, T document); Task DeleteAsync(string keyField, string keyValue); + + Task DeleteByIdAsync(string id); } \ No newline at end of file diff --git a/backend/Application/Services/Database/MongoDB/IMedicalHistoryMongoDbService.cs b/backend/Application/Services/Database/MongoDB/IMedicalHistoryMongoDbService.cs index c406bbd..0b71a2a 100644 --- a/backend/Application/Services/Database/MongoDB/IMedicalHistoryMongoDbService.cs +++ b/backend/Application/Services/Database/MongoDB/IMedicalHistoryMongoDbService.cs @@ -14,4 +14,6 @@ public interface IMedicalHistoryMongoDbService Task ModifyAsync(string keyField, string keyValue, T document); Task DeleteAsync(string keyField, string keyValue); + + Task DeleteByIdAsync(string id); } \ No newline at end of file diff --git a/backend/Application/bin/Debug/net8.0/Application.dll b/backend/Application/bin/Debug/net8.0/Application.dll index ac54dcf..da45137 100644 Binary files a/backend/Application/bin/Debug/net8.0/Application.dll and b/backend/Application/bin/Debug/net8.0/Application.dll differ diff --git a/backend/Application/bin/Debug/net8.0/Application.pdb b/backend/Application/bin/Debug/net8.0/Application.pdb index 582da16..c858089 100644 Binary files a/backend/Application/bin/Debug/net8.0/Application.pdb and b/backend/Application/bin/Debug/net8.0/Application.pdb differ diff --git a/backend/Application/bin/Debug/net8.0/Core.dll b/backend/Application/bin/Debug/net8.0/Core.dll index 62444bc..f766e5c 100644 Binary files a/backend/Application/bin/Debug/net8.0/Core.dll and b/backend/Application/bin/Debug/net8.0/Core.dll differ diff --git a/backend/Application/bin/Debug/net8.0/Core.pdb b/backend/Application/bin/Debug/net8.0/Core.pdb index be53c18..d8cfb2d 100644 Binary files a/backend/Application/bin/Debug/net8.0/Core.pdb and b/backend/Application/bin/Debug/net8.0/Core.pdb differ diff --git a/backend/Application/obj/Debug/net8.0/Application.AssemblyInfo.cs b/backend/Application/obj/Debug/net8.0/Application.AssemblyInfo.cs index e3e1f3b..03b6ea7 100644 --- a/backend/Application/obj/Debug/net8.0/Application.AssemblyInfo.cs +++ b/backend/Application/obj/Debug/net8.0/Application.AssemblyInfo.cs @@ -13,7 +13,7 @@ using System.Reflection; [assembly: System.Reflection.AssemblyCompanyAttribute("Application")] [assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")] [assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")] -[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+116405bd75830f3dec1c68562965bc78967039d5")] +[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+8663a186a056b0dfbfeebf9ae16be42b40101093")] [assembly: System.Reflection.AssemblyProductAttribute("Application")] [assembly: System.Reflection.AssemblyTitleAttribute("Application")] [assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")] diff --git a/backend/Application/obj/Debug/net8.0/Application.AssemblyInfoInputs.cache b/backend/Application/obj/Debug/net8.0/Application.AssemblyInfoInputs.cache index e88b5bc..ab0d42b 100644 --- a/backend/Application/obj/Debug/net8.0/Application.AssemblyInfoInputs.cache +++ b/backend/Application/obj/Debug/net8.0/Application.AssemblyInfoInputs.cache @@ -1 +1 @@ -2c0d3af716a6d40ccc6e2610395f654ee8489b15d024a3e4172c975777258df5 +80601916b304e5754240a2dc14d4162100bc8fba5aed89bf6da00753d5c3920c diff --git a/backend/Application/obj/Debug/net8.0/Application.csproj.AssemblyReference.cache b/backend/Application/obj/Debug/net8.0/Application.csproj.AssemblyReference.cache index 070add5..3d21b97 100644 Binary files a/backend/Application/obj/Debug/net8.0/Application.csproj.AssemblyReference.cache and b/backend/Application/obj/Debug/net8.0/Application.csproj.AssemblyReference.cache differ diff --git a/backend/Application/obj/Debug/net8.0/Application.csproj.CoreCompileInputs.cache b/backend/Application/obj/Debug/net8.0/Application.csproj.CoreCompileInputs.cache index 61c98ff..c5f2cf2 100644 --- a/backend/Application/obj/Debug/net8.0/Application.csproj.CoreCompileInputs.cache +++ b/backend/Application/obj/Debug/net8.0/Application.csproj.CoreCompileInputs.cache @@ -1 +1 @@ -a14527b9f0436826149b6114fc93ca0d3615f169c5065e509d90189e6d49d7bf +23c9f8ecc5e36ec26454d9182eac70caff389e981316327bbd7443ce0fba8796 diff --git a/backend/Application/obj/Debug/net8.0/Application.dll b/backend/Application/obj/Debug/net8.0/Application.dll index ac54dcf..da45137 100644 Binary files a/backend/Application/obj/Debug/net8.0/Application.dll and b/backend/Application/obj/Debug/net8.0/Application.dll differ diff --git a/backend/Application/obj/Debug/net8.0/Application.pdb b/backend/Application/obj/Debug/net8.0/Application.pdb index 582da16..c858089 100644 Binary files a/backend/Application/obj/Debug/net8.0/Application.pdb and b/backend/Application/obj/Debug/net8.0/Application.pdb differ diff --git a/backend/Application/obj/Debug/net8.0/Application.sourcelink.json b/backend/Application/obj/Debug/net8.0/Application.sourcelink.json index 84ecd88..bb69c3e 100644 --- a/backend/Application/obj/Debug/net8.0/Application.sourcelink.json +++ b/backend/Application/obj/Debug/net8.0/Application.sourcelink.json @@ -1 +1 @@ -{"documents":{"C:\\Users\\Andrei Cerbu\\Documents\\FACULTATE\\CC-FinalProj\\*":"https://raw.githubusercontent.com/andrei-mihnea-cerbu/CC-FinalProj/48eb2adcbd149cd66c77ba558f492179d2bf29be/*"}} \ No newline at end of file +{"documents":{"C:\\Users\\Andrei Cerbu\\Documents\\FACULTATE\\CC-FinalProj\\*":"https://raw.githubusercontent.com/andrei-mihnea-cerbu/CC-FinalProj/8663a186a056b0dfbfeebf9ae16be42b40101093/*"}} \ No newline at end of file diff --git a/backend/Application/obj/Debug/net8.0/ref/Application.dll b/backend/Application/obj/Debug/net8.0/ref/Application.dll index e1c0fb5..c123beb 100644 Binary files a/backend/Application/obj/Debug/net8.0/ref/Application.dll and b/backend/Application/obj/Debug/net8.0/ref/Application.dll differ diff --git a/backend/Application/obj/Debug/net8.0/refint/Application.dll b/backend/Application/obj/Debug/net8.0/refint/Application.dll index e1c0fb5..c123beb 100644 Binary files a/backend/Application/obj/Debug/net8.0/refint/Application.dll and b/backend/Application/obj/Debug/net8.0/refint/Application.dll differ diff --git a/backend/Core/Entities/Appointment.cs b/backend/Core/Entities/Appointment.cs new file mode 100644 index 0000000..2a98608 --- /dev/null +++ b/backend/Core/Entities/Appointment.cs @@ -0,0 +1,30 @@ +namespace Core.Entities; + +public class Appointment +{ + public Appointment() + { + AppointmentsList = new List(); + } + + public string Id { get; private set; } + public string PatientId { get; private set; } + public string DoctorId { get; private set; } + public List AppointmentsList { get; private set; } + + public void SetId(string id) { Id = id; } + public void SetPatientId(string patientId) { PatientId = patientId; } + public void SetDoctorIid(string doctorId) { DoctorId = doctorId; } + + public void AddAppointment(DateTime appointmentDate) + { + DateTime utcAppointmentDate = new DateTime(appointmentDate.Year, appointmentDate.Month, appointmentDate.Day, 0, 0, 0, DateTimeKind.Utc); + AppointmentsList.Add(utcAppointmentDate); + } + + public void RemoveAppointment(DateTime appointmentDate) + { + DateTime utcAppointmentDate = new DateTime(appointmentDate.Year, appointmentDate.Month, appointmentDate.Day, 0, 0, 0, DateTimeKind.Utc); + AppointmentsList.Remove(utcAppointmentDate); + } +} \ No newline at end of file diff --git a/backend/Core/bin/Debug/net8.0/Core.dll b/backend/Core/bin/Debug/net8.0/Core.dll index 62444bc..f766e5c 100644 Binary files a/backend/Core/bin/Debug/net8.0/Core.dll and b/backend/Core/bin/Debug/net8.0/Core.dll differ diff --git a/backend/Core/bin/Debug/net8.0/Core.pdb b/backend/Core/bin/Debug/net8.0/Core.pdb index be53c18..d8cfb2d 100644 Binary files a/backend/Core/bin/Debug/net8.0/Core.pdb and b/backend/Core/bin/Debug/net8.0/Core.pdb differ diff --git a/backend/Core/obj/Debug/net8.0/Core.AssemblyInfo.cs b/backend/Core/obj/Debug/net8.0/Core.AssemblyInfo.cs index 6bb2bdd..8d95bb6 100644 --- a/backend/Core/obj/Debug/net8.0/Core.AssemblyInfo.cs +++ b/backend/Core/obj/Debug/net8.0/Core.AssemblyInfo.cs @@ -13,7 +13,7 @@ using System.Reflection; [assembly: System.Reflection.AssemblyCompanyAttribute("Core")] [assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")] [assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")] -[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+116405bd75830f3dec1c68562965bc78967039d5")] +[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+8663a186a056b0dfbfeebf9ae16be42b40101093")] [assembly: System.Reflection.AssemblyProductAttribute("Core")] [assembly: System.Reflection.AssemblyTitleAttribute("Core")] [assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")] diff --git a/backend/Core/obj/Debug/net8.0/Core.AssemblyInfoInputs.cache b/backend/Core/obj/Debug/net8.0/Core.AssemblyInfoInputs.cache index 233c625..78a34e8 100644 --- a/backend/Core/obj/Debug/net8.0/Core.AssemblyInfoInputs.cache +++ b/backend/Core/obj/Debug/net8.0/Core.AssemblyInfoInputs.cache @@ -1 +1 @@ -2b55ffa63c3c28b8380b15c20fdfc361e74063c09bcdfe546bd072959418bb1d +64c3fddc13943090bd8e18623615579ccefdab8583782b4c5a641fec31fea4c9 diff --git a/backend/Core/obj/Debug/net8.0/Core.csproj.CoreCompileInputs.cache b/backend/Core/obj/Debug/net8.0/Core.csproj.CoreCompileInputs.cache index 2feed48..5ee9efa 100644 --- a/backend/Core/obj/Debug/net8.0/Core.csproj.CoreCompileInputs.cache +++ b/backend/Core/obj/Debug/net8.0/Core.csproj.CoreCompileInputs.cache @@ -1 +1 @@ -6236e3f912b0532e598b72e522cff0eefd892ca01f330905ca686a017c34f569 +191029eab79e7925db94e77981abb39d1ba794fbe54c7d8989ebbb72ab0bc2dc diff --git a/backend/Core/obj/Debug/net8.0/Core.dll b/backend/Core/obj/Debug/net8.0/Core.dll index 62444bc..f766e5c 100644 Binary files a/backend/Core/obj/Debug/net8.0/Core.dll and b/backend/Core/obj/Debug/net8.0/Core.dll differ diff --git a/backend/Core/obj/Debug/net8.0/Core.pdb b/backend/Core/obj/Debug/net8.0/Core.pdb index be53c18..d8cfb2d 100644 Binary files a/backend/Core/obj/Debug/net8.0/Core.pdb and b/backend/Core/obj/Debug/net8.0/Core.pdb differ diff --git a/backend/Core/obj/Debug/net8.0/Core.sourcelink.json b/backend/Core/obj/Debug/net8.0/Core.sourcelink.json index 84ecd88..bb69c3e 100644 --- a/backend/Core/obj/Debug/net8.0/Core.sourcelink.json +++ b/backend/Core/obj/Debug/net8.0/Core.sourcelink.json @@ -1 +1 @@ -{"documents":{"C:\\Users\\Andrei Cerbu\\Documents\\FACULTATE\\CC-FinalProj\\*":"https://raw.githubusercontent.com/andrei-mihnea-cerbu/CC-FinalProj/48eb2adcbd149cd66c77ba558f492179d2bf29be/*"}} \ No newline at end of file +{"documents":{"C:\\Users\\Andrei Cerbu\\Documents\\FACULTATE\\CC-FinalProj\\*":"https://raw.githubusercontent.com/andrei-mihnea-cerbu/CC-FinalProj/8663a186a056b0dfbfeebf9ae16be42b40101093/*"}} \ No newline at end of file diff --git a/backend/Core/obj/Debug/net8.0/ref/Core.dll b/backend/Core/obj/Debug/net8.0/ref/Core.dll index 5106d40..182da6f 100644 Binary files a/backend/Core/obj/Debug/net8.0/ref/Core.dll and b/backend/Core/obj/Debug/net8.0/ref/Core.dll differ diff --git a/backend/Core/obj/Debug/net8.0/refint/Core.dll b/backend/Core/obj/Debug/net8.0/refint/Core.dll index 5106d40..182da6f 100644 Binary files a/backend/Core/obj/Debug/net8.0/refint/Core.dll and b/backend/Core/obj/Debug/net8.0/refint/Core.dll differ diff --git a/backend/Infrastructure/InfrastructureDI.cs b/backend/Infrastructure/InfrastructureDI.cs index b63491a..7770b92 100644 --- a/backend/Infrastructure/InfrastructureDI.cs +++ b/backend/Infrastructure/InfrastructureDI.cs @@ -49,21 +49,28 @@ public static class DependencyInjection return new ChatMongoDbService(connectionString, databaseName, collectionName); }); + services.AddSingleton(serviceProvider => + { + var configuration = serviceProvider.GetRequiredService(); + var connectionString = configuration.GetConnectionString("MongoDBConnection"); + var databaseName = configuration["HealthcareManagerDatabase:Name"]; + var collectionName = configuration["HealthcareManagerDatabase:AppointmentsCollectionName"]; + + return new AppointmentsMongoDbService(connectionString, databaseName, collectionName); + }); + // Other Services services.AddScoped(); + services.AddSingleton(serviceProvider => { var configuration = serviceProvider.GetRequiredService(); return new JwtService(configuration); }); + // services.AddScoped(); return services; } - - private static string ExtractMongoDbDatabaseName(string connectionString) - { - var connectionStringBuilder = new MongoUrlBuilder(connectionString); - return connectionStringBuilder.DatabaseName; - } + } \ No newline at end of file diff --git a/backend/Infrastructure/Services/Jwt/JWTService.cs b/backend/Infrastructure/Services/Jwt/JWTService.cs index e32f613..40c742c 100644 --- a/backend/Infrastructure/Services/Jwt/JWTService.cs +++ b/backend/Infrastructure/Services/Jwt/JWTService.cs @@ -18,7 +18,7 @@ public class JwtService : IJwtService _secretKey = configuration["Jwt:SecretKey"]; _issuer = configuration["Jwt:Issuer"]; _audience = configuration["Jwt:Audience"]; - _expiryMinutes = double.Parse(configuration["Jwt:ExpiryMinutes"]); + _expiryMinutes = double.Parse(configuration["Jwt:ExpirationTime"]); } public string GenerateJwtToken(string email) diff --git a/backend/Infrastructure/Services/MongoDB/AppointmentsMongoDbService.cs b/backend/Infrastructure/Services/MongoDB/AppointmentsMongoDbService.cs new file mode 100644 index 0000000..79087dc --- /dev/null +++ b/backend/Infrastructure/Services/MongoDB/AppointmentsMongoDbService.cs @@ -0,0 +1,59 @@ +using Application.Endpoints.Appointments; +using Application.Services.Database.MongoDB; +using Core.Entities; + +namespace Infrastructure.Services.MongoDB; + +public class AppointmentsMongoDbService : MongoDbService, IAppointmentsMongoDbService +{ + public AppointmentsMongoDbService(string connectionString, string databaseName, string collectionName) + : base(connectionString, databaseName, collectionName) + { + } + + public async Task IsAppointmentUnique(AppointmentManagementDto dto) + { + var appointment = dto.Appointment.ToUniversalTime(); + + var criteria = new List<(string FieldName, string Value)> + { + ("DoctorId", dto.DoctorId.ToString()), + ("PatientId", dto.PatientId.ToString()) + }; + + var appointments = await FindAsync(criteria); + + foreach (var app in appointments) + { + if (app.AppointmentsList.Any(a => a.Date == appointment.Date)) + { + return false; + } + } + + return true; + } + + public async Task DoesAppointmentExists(AppointmentManagementDto dto) + { + var appointment = dto.Appointment.ToUniversalTime(); + + var criteria = new List<(string FieldName, string Value)> + { + ("DoctorId", dto.DoctorId.ToString()), + ("PatientId", dto.PatientId.ToString()) + }; + + var appointments = await FindAsync(criteria); + + foreach (var app in appointments) + { + if (app.AppointmentsList.Any(a => a.Date == appointment.Date)) + { + return true; + } + } + + return false; + } +} \ No newline at end of file diff --git a/backend/Infrastructure/Services/MongoDB/MongoDBServices.cs b/backend/Infrastructure/Services/MongoDB/MongoDBServices.cs index b2048e4..99c8fef 100644 --- a/backend/Infrastructure/Services/MongoDB/MongoDBServices.cs +++ b/backend/Infrastructure/Services/MongoDB/MongoDBServices.cs @@ -70,5 +70,12 @@ namespace Infrastructure.Services.MongoDB var filter = Builders.Filter.Eq(keyField, keyValue); await collection.DeleteOneAsync(filter); } + + public async Task DeleteByIdAsync(string id) + { + var collection = _database.GetDatabase(_databaseName).GetCollection(_collectionName); + var filter = Builders.Filter.Eq("_id", id); + await collection.DeleteOneAsync(filter); + } } } \ No newline at end of file diff --git a/backend/Infrastructure/bin/Debug/net8.0/Application.dll b/backend/Infrastructure/bin/Debug/net8.0/Application.dll index ac54dcf..da45137 100644 Binary files a/backend/Infrastructure/bin/Debug/net8.0/Application.dll and b/backend/Infrastructure/bin/Debug/net8.0/Application.dll differ diff --git a/backend/Infrastructure/bin/Debug/net8.0/Application.pdb b/backend/Infrastructure/bin/Debug/net8.0/Application.pdb index 582da16..c858089 100644 Binary files a/backend/Infrastructure/bin/Debug/net8.0/Application.pdb and b/backend/Infrastructure/bin/Debug/net8.0/Application.pdb differ diff --git a/backend/Infrastructure/bin/Debug/net8.0/Core.dll b/backend/Infrastructure/bin/Debug/net8.0/Core.dll index 62444bc..f766e5c 100644 Binary files a/backend/Infrastructure/bin/Debug/net8.0/Core.dll and b/backend/Infrastructure/bin/Debug/net8.0/Core.dll differ diff --git a/backend/Infrastructure/bin/Debug/net8.0/Core.pdb b/backend/Infrastructure/bin/Debug/net8.0/Core.pdb index be53c18..d8cfb2d 100644 Binary files a/backend/Infrastructure/bin/Debug/net8.0/Core.pdb and b/backend/Infrastructure/bin/Debug/net8.0/Core.pdb differ diff --git a/backend/Infrastructure/bin/Debug/net8.0/Infrastructure.deps.json b/backend/Infrastructure/bin/Debug/net8.0/Infrastructure.deps.json index 6039032..51b0577 100644 --- a/backend/Infrastructure/bin/Debug/net8.0/Infrastructure.deps.json +++ b/backend/Infrastructure/bin/Debug/net8.0/Infrastructure.deps.json @@ -16,8 +16,10 @@ "Microsoft.Extensions.Configuration": "8.0.0", "Microsoft.Extensions.Configuration.Json": "8.0.0", "Microsoft.Extensions.Options.ConfigurationExtensions": "8.0.0", + "Microsoft.IdentityModel.Tokens": "7.5.1", "MongoDB.Driver": "2.24.0", - "Npgsql.EntityFrameworkCore.PostgreSQL": "8.0.2" + "Npgsql.EntityFrameworkCore.PostgreSQL": "8.0.2", + "System.IdentityModel.Tokens.Jwt": "7.5.1" }, "runtime": { "Infrastructure.dll": {} @@ -560,6 +562,47 @@ } } }, + "Microsoft.IdentityModel.Abstractions/7.5.1": { + "runtime": { + "lib/net8.0/Microsoft.IdentityModel.Abstractions.dll": { + "assemblyVersion": "7.5.1.0", + "fileVersion": "7.5.1.50405" + } + } + }, + "Microsoft.IdentityModel.JsonWebTokens/7.5.1": { + "dependencies": { + "Microsoft.IdentityModel.Tokens": "7.5.1" + }, + "runtime": { + "lib/net8.0/Microsoft.IdentityModel.JsonWebTokens.dll": { + "assemblyVersion": "7.5.1.0", + "fileVersion": "7.5.1.50405" + } + } + }, + "Microsoft.IdentityModel.Logging/7.5.1": { + "dependencies": { + "Microsoft.IdentityModel.Abstractions": "7.5.1" + }, + "runtime": { + "lib/net8.0/Microsoft.IdentityModel.Logging.dll": { + "assemblyVersion": "7.5.1.0", + "fileVersion": "7.5.1.50405" + } + } + }, + "Microsoft.IdentityModel.Tokens/7.5.1": { + "dependencies": { + "Microsoft.IdentityModel.Logging": "7.5.1" + }, + "runtime": { + "lib/net8.0/Microsoft.IdentityModel.Tokens.dll": { + "assemblyVersion": "7.5.1.0", + "fileVersion": "7.5.1.50405" + } + } + }, "Microsoft.NETCore.Platforms/5.0.0": {}, "Microsoft.Win32.Registry/5.0.0": { "dependencies": { @@ -763,6 +806,18 @@ } } }, + "System.IdentityModel.Tokens.Jwt/7.5.1": { + "dependencies": { + "Microsoft.IdentityModel.JsonWebTokens": "7.5.1", + "Microsoft.IdentityModel.Tokens": "7.5.1" + }, + "runtime": { + "lib/net8.0/System.IdentityModel.Tokens.Jwt.dll": { + "assemblyVersion": "7.5.1.0", + "fileVersion": "7.5.1.50405" + } + } + }, "System.IO.Pipelines/6.0.3": { "runtime": { "lib/net6.0/System.IO.Pipelines.dll": { @@ -1069,6 +1124,34 @@ "path": "microsoft.extensions.primitives/8.0.0", "hashPath": "microsoft.extensions.primitives.8.0.0.nupkg.sha512" }, + "Microsoft.IdentityModel.Abstractions/7.5.1": { + "type": "package", + "serviceable": true, + "sha512": "sha512-PT16ZFbPIiMsYv07oy3zOjqUOJ7xutGBkJTOX0+IbNyU6+O6X7aIxjq9EaSSRLWbekRgamgtmfg8Xjw6A6Ua9g==", + "path": "microsoft.identitymodel.abstractions/7.5.1", + "hashPath": "microsoft.identitymodel.abstractions.7.5.1.nupkg.sha512" + }, + "Microsoft.IdentityModel.JsonWebTokens/7.5.1": { + "type": "package", + "serviceable": true, + "sha512": "sha512-93CGSa8RPdZU8zfvA3nf9NGKUqEnQrE12VzYlMqKh72ddhzusosqLNEUgH/YhFWBLRFOnY1RCgHMV7pR+sAx2w==", + "path": "microsoft.identitymodel.jsonwebtokens/7.5.1", + "hashPath": "microsoft.identitymodel.jsonwebtokens.7.5.1.nupkg.sha512" + }, + "Microsoft.IdentityModel.Logging/7.5.1": { + "type": "package", + "serviceable": true, + "sha512": "sha512-PnpAQX20BAiDIPYmWUyQSlEaWD8BLXzHpiDGTCT568Cs0ReOeyzNe401LzCeiv6ilug/KefVeV1CeqtCHTo8dw==", + "path": "microsoft.identitymodel.logging/7.5.1", + "hashPath": "microsoft.identitymodel.logging.7.5.1.nupkg.sha512" + }, + "Microsoft.IdentityModel.Tokens/7.5.1": { + "type": "package", + "serviceable": true, + "sha512": "sha512-Q3DKpyFViP84IUlTFKH/zIkswIrmSh2Vd/eFDo4wlOHy4DYxoweZEEw4kDEiKt9VCX6o7SddK3HK2xDYyFpexA==", + "path": "microsoft.identitymodel.tokens/7.5.1", + "hashPath": "microsoft.identitymodel.tokens.7.5.1.nupkg.sha512" + }, "Microsoft.NETCore.Platforms/5.0.0": { "type": "package", "serviceable": true, @@ -1209,6 +1292,13 @@ "path": "system.composition.typedparts/6.0.0", "hashPath": "system.composition.typedparts.6.0.0.nupkg.sha512" }, + "System.IdentityModel.Tokens.Jwt/7.5.1": { + "type": "package", + "serviceable": true, + "sha512": "sha512-UUw+E0R73lZLlXgneYIJQxNs1kfbcxjVzw64JQyiwjqCd4HMpAbjn+xRo86QZT84uHq8/MkqvfH82tgjgPzpuw==", + "path": "system.identitymodel.tokens.jwt/7.5.1", + "hashPath": "system.identitymodel.tokens.jwt.7.5.1.nupkg.sha512" + }, "System.IO.Pipelines/6.0.3": { "type": "package", "serviceable": true, diff --git a/backend/Infrastructure/bin/Debug/net8.0/Infrastructure.dll b/backend/Infrastructure/bin/Debug/net8.0/Infrastructure.dll index 589a16f..41780ac 100644 Binary files a/backend/Infrastructure/bin/Debug/net8.0/Infrastructure.dll and b/backend/Infrastructure/bin/Debug/net8.0/Infrastructure.dll differ diff --git a/backend/Infrastructure/bin/Debug/net8.0/Infrastructure.pdb b/backend/Infrastructure/bin/Debug/net8.0/Infrastructure.pdb index b2032af..e81a910 100644 Binary files a/backend/Infrastructure/bin/Debug/net8.0/Infrastructure.pdb and b/backend/Infrastructure/bin/Debug/net8.0/Infrastructure.pdb differ diff --git a/backend/Infrastructure/obj/Debug/net8.0/Infrastructure.AssemblyInfo.cs b/backend/Infrastructure/obj/Debug/net8.0/Infrastructure.AssemblyInfo.cs index 154d500..e0f0fd1 100644 --- a/backend/Infrastructure/obj/Debug/net8.0/Infrastructure.AssemblyInfo.cs +++ b/backend/Infrastructure/obj/Debug/net8.0/Infrastructure.AssemblyInfo.cs @@ -13,7 +13,7 @@ using System.Reflection; [assembly: System.Reflection.AssemblyCompanyAttribute("Infrastructure")] [assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")] [assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")] -[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+116405bd75830f3dec1c68562965bc78967039d5")] +[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+8663a186a056b0dfbfeebf9ae16be42b40101093")] [assembly: System.Reflection.AssemblyProductAttribute("Infrastructure")] [assembly: System.Reflection.AssemblyTitleAttribute("Infrastructure")] [assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")] diff --git a/backend/Infrastructure/obj/Debug/net8.0/Infrastructure.AssemblyInfoInputs.cache b/backend/Infrastructure/obj/Debug/net8.0/Infrastructure.AssemblyInfoInputs.cache index ca8e803..ce91f1c 100644 --- a/backend/Infrastructure/obj/Debug/net8.0/Infrastructure.AssemblyInfoInputs.cache +++ b/backend/Infrastructure/obj/Debug/net8.0/Infrastructure.AssemblyInfoInputs.cache @@ -1 +1 @@ -73cfa8a3fe505da7a9d840f72821132ea5cd333c5d680c5413ad6c2d32eb0aa9 +90add3a549a5ad86ae4df2628a148c5a9756bdaa56fd8988b963942aa2b42329 diff --git a/backend/Infrastructure/obj/Debug/net8.0/Infrastructure.csproj.AssemblyReference.cache b/backend/Infrastructure/obj/Debug/net8.0/Infrastructure.csproj.AssemblyReference.cache index 44504a3..8ccbeed 100644 Binary files a/backend/Infrastructure/obj/Debug/net8.0/Infrastructure.csproj.AssemblyReference.cache and b/backend/Infrastructure/obj/Debug/net8.0/Infrastructure.csproj.AssemblyReference.cache differ diff --git a/backend/Infrastructure/obj/Debug/net8.0/Infrastructure.csproj.CoreCompileInputs.cache b/backend/Infrastructure/obj/Debug/net8.0/Infrastructure.csproj.CoreCompileInputs.cache index 11f6f8f..0471bdc 100644 --- a/backend/Infrastructure/obj/Debug/net8.0/Infrastructure.csproj.CoreCompileInputs.cache +++ b/backend/Infrastructure/obj/Debug/net8.0/Infrastructure.csproj.CoreCompileInputs.cache @@ -1 +1 @@ -0fc8c2fdc4b952d96dcf80928d47de35d2afdbcca7797ecd9fa91d54ef6cedf9 +f7db5be1a68464cc50c7ccee2ec8ca8c6b9870991fcbe7daa2045fdfe78ab58e diff --git a/backend/Infrastructure/obj/Debug/net8.0/Infrastructure.dll b/backend/Infrastructure/obj/Debug/net8.0/Infrastructure.dll index 589a16f..41780ac 100644 Binary files a/backend/Infrastructure/obj/Debug/net8.0/Infrastructure.dll and b/backend/Infrastructure/obj/Debug/net8.0/Infrastructure.dll differ diff --git a/backend/Infrastructure/obj/Debug/net8.0/Infrastructure.pdb b/backend/Infrastructure/obj/Debug/net8.0/Infrastructure.pdb index b2032af..e81a910 100644 Binary files a/backend/Infrastructure/obj/Debug/net8.0/Infrastructure.pdb and b/backend/Infrastructure/obj/Debug/net8.0/Infrastructure.pdb differ diff --git a/backend/Infrastructure/obj/Debug/net8.0/Infrastructure.sourcelink.json b/backend/Infrastructure/obj/Debug/net8.0/Infrastructure.sourcelink.json index 84ecd88..bb69c3e 100644 --- a/backend/Infrastructure/obj/Debug/net8.0/Infrastructure.sourcelink.json +++ b/backend/Infrastructure/obj/Debug/net8.0/Infrastructure.sourcelink.json @@ -1 +1 @@ -{"documents":{"C:\\Users\\Andrei Cerbu\\Documents\\FACULTATE\\CC-FinalProj\\*":"https://raw.githubusercontent.com/andrei-mihnea-cerbu/CC-FinalProj/48eb2adcbd149cd66c77ba558f492179d2bf29be/*"}} \ No newline at end of file +{"documents":{"C:\\Users\\Andrei Cerbu\\Documents\\FACULTATE\\CC-FinalProj\\*":"https://raw.githubusercontent.com/andrei-mihnea-cerbu/CC-FinalProj/8663a186a056b0dfbfeebf9ae16be42b40101093/*"}} \ No newline at end of file diff --git a/backend/Infrastructure/obj/Debug/net8.0/ref/Infrastructure.dll b/backend/Infrastructure/obj/Debug/net8.0/ref/Infrastructure.dll index 8902520..ea2542c 100644 Binary files a/backend/Infrastructure/obj/Debug/net8.0/ref/Infrastructure.dll and b/backend/Infrastructure/obj/Debug/net8.0/ref/Infrastructure.dll differ diff --git a/backend/Infrastructure/obj/Debug/net8.0/refint/Infrastructure.dll b/backend/Infrastructure/obj/Debug/net8.0/refint/Infrastructure.dll index 8902520..ea2542c 100644 Binary files a/backend/Infrastructure/obj/Debug/net8.0/refint/Infrastructure.dll and b/backend/Infrastructure/obj/Debug/net8.0/refint/Infrastructure.dll differ