using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Threading.Tasks;
namespace KSU.CS.Pendant.Server.Models
{
///
/// A class representing an attempt by a student
/// to validate thier assignment solution
///
public class ValidationAttempt
{
/// The database primary key
public int ID { get; set; }
///
/// The user who made the attempt
///
public User User { get; set; }
///
/// The assignment this attempt is for
///
public Assignment Assignment { get; set; }
///
/// The date and time the attempt was made
///
public DateTime DateTime { get; set; } = DateTime.Now;
///
/// The total number of issues encountered in the attempt
///
public int IssueCount => StructuralIssues.Count + FunctionalIssues.Count + DesignIssues.Count + StyleIssues.Count;
///
/// The structural issues encountered in the attempt
///
public List StructuralIssues { get; set; } = new List();
///
/// The functional issues encountered in the attempt
///
public List FunctionalIssues { get; set; } = new List();
///
/// The design issues encountered in the attempt
///
public List DesignIssues { get; set; } = new List();
///
/// The style issues encountered in the attempt
///
public List StyleIssues { get; set; } = new List();
///
/// The location of the student's work in the file system
///
public string SolutionPath { get; set; }
[NotMapped]
public string RepoUrl { get; set; }
[NotMapped]
public string CommitIdentifier { get; set; }
}
}