CourseWork_KPO/CandidateReviewDatabaseImplement/Models/AssessmentCriterion.cs

27 lines
767 B
C#

using CandidateReviewContracts.ViewModels;
using System.ComponentModel.DataAnnotations;
namespace CandidateReviewDatabaseImplement.Models
{
public class AssessmentCriterion
{
public int Id { get; set; }
[Required]
public int AssessmentId { get; set; }
[Required]
public int CriterionId { get; set; }
[Required]
public int Value { get; set; }
public virtual Assessment Assessment { get; set; } = new();
public virtual Criterion Criterion { get; set; } = new();
public AssessmentCriterionViewModel GetViewModel => new()
{
Id = Id,
AssessmentId = AssessmentId,
CriterionId = CriterionId,
Value = Value
};
}
}