chore: refactoring some code to introduce a common base class for all api classes

This commit is contained in:
Matthias Langhard
2021-05-21 22:13:04 +02:00
parent ac20e2e1d4
commit 89e7ce8449
34 changed files with 721 additions and 551 deletions

53
src/Tasks/Models/Task.cs Normal file
View File

@@ -0,0 +1,53 @@
using System.Collections.Generic;
using Newtonsoft.Json;
using Novaloop.PaymoApi.Shared;
namespace Novaloop.PaymoApi.Tasks.Models
{
public class Task : BaseModel
{
[JsonProperty("name")]
public string Name { get; set; }
[JsonProperty("code")]
public string Code { get; set; }
[JsonProperty("project_id")]
public int ProjectId { get; set; }
[JsonProperty("tasklist_id")]
public int TasklistId { get; set; }
[JsonProperty("user_id")]
public int UserId { get; set; }
[JsonProperty("complete")]
public bool Complete { get; set; }
[JsonProperty("billable")]
public bool Billable { get; set; }
[JsonProperty("seq")]
public int Seq { get; set; }
[JsonProperty("description")]
public string Description { get; set; }
[JsonProperty("price_per_hour")]
public object PricePerHour { get; set; }
[JsonProperty("due_date")]
public object DueDate { get; set; }
[JsonProperty("budget_hours")]
public object BudgetHours { get; set; }
[JsonProperty("users")]
public List<int> Users { get; set; }
public override string ToString()
{
return $"[{Id}] {Name} ({TasklistId})";
}
}
}