adding polymophic classes
This commit is contained in:
parent
fc9fcabaf7
commit
ced9f3a4f5
22
classes.cs
22
classes.cs
@ -24,19 +24,29 @@ public class Objective
|
||||
public string Description { get; set; }
|
||||
public DateTime Target { get; set; }
|
||||
public Student Student { get; set; }
|
||||
public ICollection<Track> Tracks { get; set; }
|
||||
public TrackType TrackType { get; set; }
|
||||
public ICollection<Event> Events { get; set; }
|
||||
public ObjectiveType Type { get; set; }
|
||||
}
|
||||
|
||||
public class Track
|
||||
public abstract class Event
|
||||
{
|
||||
public Guid Id { get; set; }
|
||||
public DateTime Date { get; set; }
|
||||
public DateTime StartDate { get; set; }
|
||||
public DateTime? EndDate { get; set; }
|
||||
public Objective Objective { get; set; }
|
||||
public object Data { get; set; }
|
||||
}
|
||||
|
||||
public enum TrackType
|
||||
public class YesNoEvent : Event
|
||||
{
|
||||
public bool Occurred { get; set; }
|
||||
}
|
||||
|
||||
public class FrequencyEvent : Event
|
||||
{
|
||||
public int Instances { get; set; }
|
||||
}
|
||||
|
||||
public enum ObjectiveType
|
||||
{
|
||||
[Description("Yes/No")]
|
||||
YesNo = 0,
|
||||
|
Loading…
x
Reference in New Issue
Block a user