132 lines
3.6 KiB
C#
132 lines
3.6 KiB
C#
#pragma warning disable CS8618 // Non-nullable field must contain a non-null value when exiting constructor. Consider adding the 'required' modifier or declaring as nullable.
|
|
using System.Text.Json.Serialization;
|
|
|
|
namespace Blueberry.Redmine.Dto
|
|
{
|
|
public class NewIssue
|
|
{
|
|
public class Author
|
|
{
|
|
[JsonPropertyName("id")]
|
|
public int Id { get; set; }
|
|
|
|
[JsonPropertyName("name")]
|
|
public string Name { get; set; }
|
|
}
|
|
|
|
public class CustomField
|
|
{
|
|
[JsonPropertyName("id")]
|
|
public int Id { get; set; }
|
|
|
|
[JsonPropertyName("name")]
|
|
public string Name { get; set; }
|
|
|
|
[JsonPropertyName("value")]
|
|
public string Value { get; set; }
|
|
}
|
|
|
|
public class Issue
|
|
{
|
|
[JsonPropertyName("id")]
|
|
public int Id { get; set; }
|
|
|
|
[JsonPropertyName("project")]
|
|
public Project Project { get; set; }
|
|
|
|
[JsonPropertyName("tracker")]
|
|
public Tracker Tracker { get; set; }
|
|
|
|
[JsonPropertyName("status")]
|
|
public Status Status { get; set; }
|
|
|
|
[JsonPropertyName("priority")]
|
|
public Priority Priority { get; set; }
|
|
|
|
[JsonPropertyName("author")]
|
|
public Author Author { get; set; }
|
|
|
|
[JsonPropertyName("subject")]
|
|
public string Subject { get; set; }
|
|
|
|
[JsonPropertyName("description")]
|
|
public string Description { get; set; }
|
|
|
|
[JsonPropertyName("start_date")]
|
|
public string StartDate { get; set; }
|
|
|
|
[JsonPropertyName("due_date")]
|
|
public object DueDate { get; set; }
|
|
|
|
[JsonPropertyName("done_ratio")]
|
|
public int DoneRatio { get; set; }
|
|
|
|
[JsonPropertyName("is_private")]
|
|
public bool IsPrivate { get; set; }
|
|
|
|
[JsonPropertyName("estimated_hours")]
|
|
public double EstimatedHours { get; set; }
|
|
|
|
[JsonPropertyName("total_estimated_hours")]
|
|
public double TotalEstimatedHours { get; set; }
|
|
|
|
[JsonPropertyName("custom_fields")]
|
|
public List<CustomField> CustomFields { get; set; }
|
|
|
|
[JsonPropertyName("created_on")]
|
|
public DateTime CreatedOn { get; set; }
|
|
|
|
[JsonPropertyName("updated_on")]
|
|
public DateTime UpdatedOn { get; set; }
|
|
|
|
[JsonPropertyName("closed_on")]
|
|
public object ClosedOn { get; set; }
|
|
}
|
|
|
|
public class Priority
|
|
{
|
|
[JsonPropertyName("id")]
|
|
public int Id { get; set; }
|
|
|
|
[JsonPropertyName("name")]
|
|
public string Name { get; set; }
|
|
}
|
|
|
|
public class Project
|
|
{
|
|
[JsonPropertyName("id")]
|
|
public int Id { get; set; }
|
|
|
|
[JsonPropertyName("name")]
|
|
public string Name { get; set; }
|
|
}
|
|
|
|
public class Root
|
|
{
|
|
[JsonPropertyName("issue")]
|
|
public Issue Issue { get; set; }
|
|
}
|
|
|
|
public class Status
|
|
{
|
|
[JsonPropertyName("id")]
|
|
public int Id { get; set; }
|
|
|
|
[JsonPropertyName("name")]
|
|
public string Name { get; set; }
|
|
}
|
|
|
|
public class Tracker
|
|
{
|
|
[JsonPropertyName("id")]
|
|
public int Id { get; set; }
|
|
|
|
[JsonPropertyName("name")]
|
|
public string Name { get; set; }
|
|
}
|
|
|
|
|
|
}
|
|
}
|
|
#pragma warning restore CS8618 // Non-nullable field must contain a non-null value when exiting constructor. Consider adding the 'required' modifier or declaring as nullable.
|