Merge branch 'master' into feature/api-explorer
This commit is contained in:
commit
a99d66bbd7
|
@ -1,6 +1,7 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text.Json.Serialization;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.AspNetCore.Builder;
|
||||
using Microsoft.AspNetCore.Hosting;
|
||||
|
@ -32,6 +33,11 @@ namespace ScrumTaskboard
|
|||
.AllowAnyMethod()
|
||||
.AllowAnyHeader();
|
||||
}));
|
||||
services.AddMvc().AddJsonOptions(o =>
|
||||
{
|
||||
o.JsonSerializerOptions.Converters.Add(new JsonStringEnumConverter());
|
||||
o.JsonSerializerOptions.IgnoreNullValues = true;
|
||||
});
|
||||
services.AddScoped(serviceProvider => new TaskContext(
|
||||
new DbContextOptionsBuilder<TaskContext>()
|
||||
.UseNpgsql("Host=nig.gl; Port=8543; Username=scrum; Database=taskboard; Password=c6gXud7YvBWp2sgxSgy4wRN")
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
using Microsoft.EntityFrameworkCore;
|
||||
using System;
|
||||
using System.Runtime.Serialization;
|
||||
|
||||
namespace ScrumTaskboard
|
||||
{
|
||||
|
@ -34,6 +35,7 @@ namespace ScrumTaskboard
|
|||
public int sprint { get; set; }
|
||||
public int project { get; set; }
|
||||
public int userstory { get; set; }
|
||||
public ScrumPrio priority { get; set; }
|
||||
}
|
||||
|
||||
public class ScrumUserstory
|
||||
|
@ -41,7 +43,7 @@ namespace ScrumTaskboard
|
|||
public int id { get; set; }
|
||||
public string title { get; set; }
|
||||
public string content { get; set; }
|
||||
public int priority { get; set; }
|
||||
public ScrumPrio priority { get; set; }
|
||||
public int status { get; set; }
|
||||
public int category { get; set; }
|
||||
public int createdby { get; set; }
|
||||
|
@ -86,4 +88,14 @@ namespace ScrumTaskboard
|
|||
public int id { get; set; }
|
||||
public string name { get; set; }
|
||||
}
|
||||
|
||||
public enum ScrumPrio
|
||||
{
|
||||
[EnumMember(Value = "low")]
|
||||
low,
|
||||
[EnumMember(Value = "medium")]
|
||||
medium,
|
||||
[EnumMember(Value = "high")]
|
||||
high
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue