Initial commit
This commit is contained in:
13
FarmmapsApi/Models/Configuration.cs
Normal file
13
FarmmapsApi/Models/Configuration.cs
Normal 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; }
|
||||
}
|
||||
}
|
40
FarmmapsApi/Models/Item.cs
Normal file
40
FarmmapsApi/Models/Item.cs
Normal 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; }
|
||||
}
|
||||
}
|
22
FarmmapsApi/Models/ItemRequest.cs
Normal file
22
FarmmapsApi/Models/ItemRequest.cs
Normal 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; }
|
||||
}
|
||||
}
|
22
FarmmapsApi/Models/ItemTaskStatus.cs
Normal file
22
FarmmapsApi/Models/ItemTaskStatus.cs
Normal 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; }
|
||||
}
|
||||
}
|
17
FarmmapsApi/Models/TaskRequest.cs
Normal file
17
FarmmapsApi/Models/TaskRequest.cs
Normal 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>();
|
||||
}
|
||||
}
|
||||
}
|
8
FarmmapsApi/Models/UserRoot.cs
Normal file
8
FarmmapsApi/Models/UserRoot.cs
Normal file
@@ -0,0 +1,8 @@
|
||||
namespace FarmmapsApi.Models
|
||||
{
|
||||
public class UserRoot
|
||||
{
|
||||
public string Name { get; set; }
|
||||
public string Code { get; set; }
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user