Add comments to TaskContext

This commit is contained in:
Jakob Fahr 2020-07-12 22:29:56 +02:00
parent 2c7f8dbe84
commit 2ab30e0701
No known key found for this signature in database
GPG Key ID: 8873416D8E4CEF6B
1 changed files with 62 additions and 0 deletions

View File

@ -4,6 +4,13 @@ using System.Runtime.Serialization;
namespace ScrumTaskboard
{
/// <summary>
/// Provides access to the database via the Entity Framework Core.
/// </summary>
/// <remarks>
/// Each <see cref="DbSet{TEntity}"/> property represents a table.
/// Tables can be queried and updated via the context class.
/// </remarks>
public class TaskContext : DbContext
{
public DbSet<ScrumTask> Tasks { get; set; }
@ -14,11 +21,23 @@ namespace ScrumTaskboard
public DbSet<ScrumProject> Projects { get; set; }
public DbSet<ScrumUser> Users { get; set; }
/// <summary>
/// Creates a new <see cref="TaskContext"/> instance with default options.
/// </summary>
public TaskContext() { }
/// <summary>
/// Creates a new <see cref="TaskContext"/> instance with the given options.
/// </summary>
public TaskContext(DbContextOptions<TaskContext> options) : base(options) { }
}
/// <summary>
/// Represents a task in an agile work process.
/// </summary>
/// <remarks>
/// A task is a small piece of work, associated with a larger userstory.
/// </remarks>
public class ScrumTask
{
public int Id { get; set; }
@ -40,6 +59,13 @@ namespace ScrumTaskboard
public ScrumPrio Priority { get; set; }
}
/// <summary>
/// Represents a userstory in an agile work process.
/// </summary>
/// <remarks>
/// A userstory is a piece of work that can be done in one sprint.
/// It can be further divided into multiple tasks.
/// </remarks>
public class ScrumUserstory
{
public int Id { get; set; }
@ -63,6 +89,13 @@ namespace ScrumTaskboard
public ScrumSprint Sprint { get; set; }
}
/// <summary>
/// Represents a category of userstories.
/// </summary>
/// <remarks>
/// Every userstory can optionally be associated with a single category.
/// This can be helpful to organize work in larger teams.
/// </remarks>
public class ScrumCategory
{
public int Id { get; set; }
@ -74,6 +107,14 @@ namespace ScrumTaskboard
public ScrumProject Project { get; set; }
}
/// <summary>
/// Represents an agile sprint.
/// </summary>
/// <remarks>
/// A sprint is typically one to four weeks long.
/// Userstories are typically started and completed
/// during one sprint.
/// </remarks>
public class ScrumSprint
{
public int Id { get; set; }
@ -86,6 +127,13 @@ namespace ScrumTaskboard
public ScrumProject Project { get; set; }
}
/// <summary>
/// Represents the status of a task or userstory.
/// </summary>
/// <remarks>
/// Classic status are "Backlog", "In Progress" and "Done", but
/// teams can create others to fit their individual workflow.
/// </remarks>
public class ScrumStatus
{
public int Id { get; set; }
@ -93,6 +141,13 @@ namespace ScrumTaskboard
public string Description { get; set; }
}
/// <summary>
/// Represents a project that the team works on.
/// </summary>
/// <remarks>
/// Userstories and sprints can be categorized into projects,
/// to help organization for larger teams.
/// </remarks>
public class ScrumProject
{
public int Id { get; set; }
@ -100,6 +155,13 @@ namespace ScrumTaskboard
public bool IsPrivate { get; set; }
}
/// <summary>
/// Represents a team member that can work on userstories.
/// </summary>
/// <remarks>
/// This allows teams to track who is working on a userstory
/// at a given time.
/// </remarks>
public class ScrumUser
{
public int Id { get; set; }