Waldek Mastykarz dbd7d66ff6 Added sample project with API secured with AAD (#207)
Moved web part to a subdirectory
2017-05-19 16:40:43 +03:00

31 lines
990 B
C#

using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using System;
namespace pnp.api.contosoorders.Models {
public class Order {
[JsonProperty(PropertyName = "id")]
public int Id { get; set; }
[JsonProperty(PropertyName = "orderDate")]
public DateTime OrderDate { get; set; }
[JsonConverter(typeof(StringEnumConverter))]
[JsonProperty(PropertyName = "region")]
public Region Region { get; set; }
[JsonProperty(PropertyName = "rep")]
public string Rep { get; set; }
[JsonProperty(PropertyName = "item")]
public string Item { get; set; }
[JsonProperty(PropertyName = "units")]
public uint Units { get; set; }
[JsonProperty(PropertyName = "unitCost")]
public double UnitCost { get; set; }
[JsonProperty(PropertyName = "total")]
public double Total { get; set; }
}
public enum Region {
East,
Central,
West
}
}