diff --git a/src/InternshipSystem.Api/Commands/UpdateRegistrationForm.cs b/src/InternshipSystem.Api/Commands/UpdateRegistrationForm.cs index 5bcb1be..61a35af 100644 --- a/src/InternshipSystem.Api/Commands/UpdateRegistrationForm.cs +++ b/src/InternshipSystem.Api/Commands/UpdateRegistrationForm.cs @@ -13,6 +13,7 @@ namespace InternshipSystem.Api.Commands public DateTime? End { get; set; } public UpdateMentor? Mentor { get; set; } public List Subjects { get; set; } + public int? Hours { get; set; } public long? Type { get; set; } } diff --git a/src/InternshipSystem.Api/UseCases/UpdateInternshipRegistrationUseCase.cs b/src/InternshipSystem.Api/UseCases/UpdateInternshipRegistrationUseCase.cs index c3b49a5..a490cf4 100644 --- a/src/InternshipSystem.Api/UseCases/UpdateInternshipRegistrationUseCase.cs +++ b/src/InternshipSystem.Api/UseCases/UpdateInternshipRegistrationUseCase.cs @@ -36,6 +36,7 @@ namespace InternshipSystem.Api.UseCases { subjectRegistration.Start = registrationCommand.Start ?? subjectRegistration.Start; subjectRegistration.End = registrationCommand.End ?? subjectRegistration.End; + subjectRegistration.DeclaredHours = registrationCommand.Hours ?? subjectRegistration.DeclaredHours; if (registrationCommand.Type.HasValue) { diff --git a/src/InternshipSystem.Core/Entity/Internship/InternshipRegistration.cs b/src/InternshipSystem.Core/Entity/Internship/InternshipRegistration.cs index db6b877..d220a42 100644 --- a/src/InternshipSystem.Core/Entity/Internship/InternshipRegistration.cs +++ b/src/InternshipSystem.Core/Entity/Internship/InternshipRegistration.cs @@ -16,8 +16,10 @@ namespace InternshipSystem.Core.Entity.Internship public Mentor Mentor { get; set; } public List Subjects { get; set; } public InternshipType Type { get; set; } + + public int DeclaredHours { get; set; } public DocumentState State { get; set; } - + public static InternshipRegistration Create() { return new InternshipRegistration();