Address compiler warnings
This commit is contained in:
@@ -9,7 +9,7 @@ public class EventDefinition
|
||||
[Required]
|
||||
[StringLength(100, MinimumLength = 2)]
|
||||
[Display(Name = "Event Name")]
|
||||
public string Name { get; set; }
|
||||
public string Name { get; set; } = null!;
|
||||
|
||||
[Required]
|
||||
[StringLength(40, MinimumLength = 2)]
|
||||
@@ -72,7 +72,7 @@ public class EventDefinition
|
||||
|
||||
[Required]
|
||||
[StringLength(256)]
|
||||
public string Eligibility { get; set; }
|
||||
public string Eligibility { get; set; } = null!;
|
||||
[StringLength(4096)]
|
||||
public string? Theme { get; set; }
|
||||
[StringLength(1024)]
|
||||
|
||||
@@ -3,12 +3,12 @@ namespace Core.Entities
|
||||
{
|
||||
public class EventOccurrence
|
||||
{
|
||||
public string Name { get; set; }
|
||||
public string Time { get; set; }
|
||||
public string Date { get; set; }
|
||||
public string Name { get; set; } = null!;
|
||||
public string Time { get; set; } = null!;
|
||||
public string Date { get; set; } = null!;
|
||||
public DateTime StartTime { get; set; }
|
||||
public DateTime? EndTime { get; set; }
|
||||
public string Location { get; set; }
|
||||
public string Location { get; set; } = null!;
|
||||
|
||||
public bool SignupSubmitPickup =>
|
||||
Name.Contains("Sign-up") ||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
public class PartialTeam : Team
|
||||
{
|
||||
public IList<Student> OmittedStudents { get; set; }
|
||||
public IList<Student> OmittedStudents { get; set; } = null!;
|
||||
|
||||
public override Team CloneWithOmittedStudents(IEnumerable<Student> studentsToOmit)
|
||||
{
|
||||
|
||||
@@ -10,12 +10,12 @@ public class Student : IEquatable<Student>
|
||||
[Required]
|
||||
[StringLength(50,MinimumLength = 2)]
|
||||
[Display(Name = "First Name")]
|
||||
public string FirstName { get; set; }
|
||||
public string FirstName { get; set; } = null!;
|
||||
|
||||
[Required]
|
||||
[StringLength(50, MinimumLength = 2)]
|
||||
[Display(Name = "Last Name")]
|
||||
public string LastName { get; set; }
|
||||
public string LastName { get; set; } = null!;
|
||||
|
||||
[Range(5,12)]
|
||||
[Display(Name = "Grade")]
|
||||
@@ -44,7 +44,7 @@ public class Student : IEquatable<Student>
|
||||
[Display(Name = "Officer Role")]
|
||||
public OfficerRole? OfficerRole { get; set; }
|
||||
|
||||
public List<Team> Teams { get; set; } = null;
|
||||
public List<Team> Teams { get; set; } = null!;
|
||||
public List<EventDefinition> RankedEvents { get; } = [];
|
||||
public List<StudentEventRanking> EventRankings { get; } = [];
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
public class StudentEventStatistics
|
||||
{
|
||||
public Student Student { get; set; }
|
||||
public Student Student { get; set; } = null!;
|
||||
public List<EventDefinition> Events { get; set; } = [];
|
||||
|
||||
public int? TotalLevelOfEffort => Events.Sum(e => e.LevelOfEffort);
|
||||
|
||||
@@ -6,7 +6,7 @@ public class Team
|
||||
public int Id { get; set; }
|
||||
|
||||
[Required]
|
||||
public EventDefinition Event { get; set; }
|
||||
public EventDefinition Event { get; set; } = null!;
|
||||
|
||||
public List<Student> Students { get; set; } = [];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user