Created
September 21, 2019 22:11
-
-
Save scionwest/429d29e2b595d6ea28977cc441fa35f3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class ProjectEntity | |
{ | |
public Guid Id { get; set; } = Guid.NewGuid(); | |
public Guid TrackerId { get; set; } | |
public string Title { get; set; } | |
public bool IsFlagged { get; set; } | |
public int Type { get; set; } | |
public bool IsArchived { get; set; } | |
public TrackerEntity ProjectTracker { get; set; } | |
public List<TaskEntity> Tasks { get; set; } = new List<TaskEntity>(); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class ProjectEntityTypeConfiguration : IEntityTypeConfiguration<ProjectEntity> | |
{ | |
public void Configure(EntityTypeBuilder<ProjectEntity> builder) | |
{ | |
builder.ToTable("Project"); | |
builder.Property(pe => pe.Id) | |
.IsRequired(); | |
builder.Property(pe => pe.IsArchived) | |
.IsRequired(); | |
builder.HasOne(pe => pe.ProjectTracker) | |
.WithOne(); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class TaskEntity | |
{ | |
public Guid Id { get; set; } = Guid.NewGuid(); | |
public Guid TrackerId { get; set; } | |
public Guid TaskGroupId { get; set; } | |
public string Title { get; set; } | |
public bool IsComplete { get; set; } | |
public TrackerEntity TaskTracker { get; set; } | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class TaskGroupEntity | |
{ | |
public Guid Id { get; set; } = Guid.NewGuid(); | |
public Guid ProjectId { get; set; } | |
public Guid TrackerId { get; set; } | |
public string Name { get; set; } | |
public bool IsComplete { get; set; } | |
public List<TaskEntity> Tasks { get; set; } = new List<TaskEntity>(); | |
public TrackerEntity TaskTracker { get; set; } | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class TrackerEntity | |
{ | |
public Guid Id { get; set; } = Guid.NewGuid(); | |
public DateTime? StartDate { get; set; } | |
public DateTime? TargetDate { get; set; } | |
public DateTime? CompletionDate { get; set; } | |
public int Status { get; set; } | |
public short PercentageCompleted { get; set; } | |
public int Priority { get; set; } | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment