diff --git a/Tsi1.Api/Tsi1.BusinessLayer/Dtos/StudentCourseResultCreateDto.cs b/Tsi1.Api/Tsi1.BusinessLayer/Dtos/StudentCourseResultCreateDto.cs new file mode 100644 index 0000000000000000000000000000000000000000..64cb01dde3e7381a3dd069624682ab2f9977c22d --- /dev/null +++ b/Tsi1.Api/Tsi1.BusinessLayer/Dtos/StudentCourseResultCreateDto.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace Tsi1.BusinessLayer.Dtos +{ + public class StudentCourseResultCreateDto + { + public int Result { get; set; } + public int StudentId { get; set; } + public int CourseId { get; set; } + } +} diff --git a/Tsi1.Api/Tsi1.BusinessLayer/Dtos/StudentCourseResultPreviewDto.cs b/Tsi1.Api/Tsi1.BusinessLayer/Dtos/StudentCourseResultPreviewDto.cs new file mode 100644 index 0000000000000000000000000000000000000000..b1ca70a88385bfce974b5b4d9873940eda483caf --- /dev/null +++ b/Tsi1.Api/Tsi1.BusinessLayer/Dtos/StudentCourseResultPreviewDto.cs @@ -0,0 +1,18 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace Tsi1.BusinessLayer.Dtos +{ + public class StudentCourseResultPreviewDto + { + public int Id { get; set; } + + public int Result { get; set; } + + public DateTime Date { get; set; } + + public int StudentId { get; set; } + public int CourseId { get; set; } + } +} diff --git a/Tsi1.Api/Tsi1.BusinessLayer/Helpers/CourseApproval.cs b/Tsi1.Api/Tsi1.BusinessLayer/Helpers/CourseApproval.cs new file mode 100644 index 0000000000000000000000000000000000000000..bc2af854e47deed3606e27b8b598598d78df2433 --- /dev/null +++ b/Tsi1.Api/Tsi1.BusinessLayer/Helpers/CourseApproval.cs @@ -0,0 +1,11 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace Tsi1.BusinessLayer.Helpers +{ + public static class CourseApproval + { + public const int MinimumApproval = 3; + } +} diff --git a/Tsi1.Api/Tsi1.BusinessLayer/Helpers/ErrorMessages.cs b/Tsi1.Api/Tsi1.BusinessLayer/Helpers/ErrorMessages.cs index 6812a7205963d518917cffee2c9c874f1a955986..8119e4cad5a5356b8bcb6eae7949e6403ce71b24 100644 --- a/Tsi1.Api/Tsi1.BusinessLayer/Helpers/ErrorMessages.cs +++ b/Tsi1.Api/Tsi1.BusinessLayer/Helpers/ErrorMessages.cs @@ -83,5 +83,8 @@ namespace Tsi1.BusinessLayer.Helpers public const string VideoConferenceIsNotEvaluation = "Una video conferencia no es una evaluación"; + public const string CourseAlreadyApproved = "El estudiante '{0}' ya aprovó el curso '{1}'"; + + public const string StudentCourseResultDoesNotExist = "El resultado con id '{0}' no existe"; } } diff --git a/Tsi1.Api/Tsi1.BusinessLayer/Helpers/MappingProfile.cs b/Tsi1.Api/Tsi1.BusinessLayer/Helpers/MappingProfile.cs index 9e8a5bcf3035bbb009aea713ff59ace7f5e36f5e..0e9175c40fdf5773ae8f558acde595cce0574897 100644 --- a/Tsi1.Api/Tsi1.BusinessLayer/Helpers/MappingProfile.cs +++ b/Tsi1.Api/Tsi1.BusinessLayer/Helpers/MappingProfile.cs @@ -67,7 +67,9 @@ namespace Tsi1.BusinessLayer.Helpers CreateMap<Evaluation, EvaluationModifyDto>(); CreateMap<Evaluation, EvaluationDetailDto>(); CreateMap<EvaluationInscription, EvaluationInscriptionDto>(); - + CreateMap<StudentCourseResult, StudentCourseResultCreateDto>(); + CreateMap<StudentCourseResult, StudentCourseResultPreviewDto>(); + CreateMap<ForumCreateDto, Forum>(); CreateMap<ForumPreviewDto, Forum>(); CreateMap<ForumModifyDto, Forum>(); @@ -120,6 +122,8 @@ namespace Tsi1.BusinessLayer.Helpers CreateMap<EvaluationModifyDto, Evaluation>().ForMember(x => x.Id, opt => opt.Ignore()); CreateMap<EvaluationDetailDto, Evaluation>(); CreateMap<EvaluationInscriptionDto, EvaluationInscription>(); + CreateMap<StudentCourseResultCreateDto, StudentCourseResult>(); + CreateMap<StudentCourseResultPreviewDto, StudentCourseResult>(); } } }