chore: refactoring some code to introduce a common base class for all api classes
This commit is contained in:
53
src/Tasks/Models/Task.cs
Normal file
53
src/Tasks/Models/Task.cs
Normal 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})";
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user