Initial commit

This commit is contained in:
2020-03-24 09:47:08 +01:00
commit 2bbae6f00d
20 changed files with 588 additions and 0 deletions

View File

@@ -0,0 +1,13 @@
namespace FarmmapsApi.Models
{
public class Configuration
{
public string Authority { get; set; }
public string Endpoint { get; set; }
public string DiscoveryEndpointUrl { get; set; }
public string RedirectUri { get; set; }
public string ClientId { get; set; }
public string ClientSecret { get; set; }
public string[] Scopes { get; set; }
}
}

View File

@@ -0,0 +1,40 @@
using System;
using System.Collections.Generic;
using Newtonsoft.Json.Linq;
namespace FarmmapsApi.Models
{
public class Item
{
public Item()
{
Tags = new List<string>();
}
public string Code { get; set; }
public string Name { get; set; }
public DateTime? Created { get; set; }
public DateTime? Updated { get; set; }
public DateTime? DataDate { get; set; }
public string ItemType { get; set; }
public string SourceTask { get; set; }
public long Size { get; set; }
public int State { get; set; }
public string ParentCode { get; set; }
public JObject Geometry { get; set; }
public JObject Data { get; set; }
public IList<string> Tags { get; set; }
}
}

View File

@@ -0,0 +1,22 @@
using System;
using System.Collections.Generic;
using Newtonsoft.Json.Linq;
namespace FarmmapsApi.Models
{
public class ItemRequest
{
public ItemRequest()
{
Tags = new List<string>();
}
public string ParentCode { get; set; }
public string ItemType { get; set; }
public string Name { get; set; }
public DateTime? DataDate { get; set; }
public JObject Geometry { get; set; }
public JObject Data { get; set; }
public IList<string> Tags { get; set; }
}
}

View File

@@ -0,0 +1,22 @@
using System;
namespace FarmmapsApi.Models
{
public enum ItemTaskState
{
Error,
Ok,
Scheduled,
Processing,
}
public class ItemTaskStatus
{
public string TaskType { get; set; }
public string Code { get; set; }
public string Message { get; set; }
public ItemTaskState State { get; set; }
public DateTime? Started { get; set; }
public DateTime? Finished { get; set; }
}
}

View File

@@ -0,0 +1,17 @@
using System.Collections.Generic;
namespace FarmmapsApi.Models
{
public class TaskRequest
{
public string TaskType { get; set; }
public string Delay { get; set; }
public Dictionary<string, string> attributes { get; set; }
public TaskRequest()
{
this.attributes = new Dictionary<string, string>();
}
}
}

View File

@@ -0,0 +1,8 @@
namespace FarmmapsApi.Models
{
public class UserRoot
{
public string Name { get; set; }
public string Code { get; set; }
}
}