Skip to content

Commit

Permalink
added weight parameter and refactored the quantity to be an int.
Browse files Browse the repository at this point in the history
  • Loading branch information
johnathan committed May 6, 2020
1 parent a4d6727 commit 5c97a7b
Show file tree
Hide file tree
Showing 7 changed files with 25 additions and 12 deletions.
2 changes: 1 addition & 1 deletion GroceriesApi.sln
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.29926.136
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GroceriesApi", "GroceriesApi.csproj", "{E9CD22F4-3E57-4B31-ACF9-2AF695AA5A4C}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GroceriesApi", "GroceriesApi.csproj", "{E9CD22F4-3E57-4B31-ACF9-2AF695AA5A4C}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand Down
1 change: 1 addition & 0 deletions Models/GroceryDueDateModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,6 @@ public class GroceryDueDateModel : IGroceryDueDate, IGroceryModel
public string id { get; set; }
public string grocery { get; set; }
public DateTime? sellByDate { get; set; }
public string groceryid { get; set; }
}
}
3 changes: 2 additions & 1 deletion Models/GroceryListModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ public class GroceryListModel : IGroceryListModel
public string section { get; set; }
public string brand { get; set; }
public string grocery { get; set; }
public decimal quantity { get; set; }
public int quantity { get; set; }
public decimal weight { get; set; }

}
}
4 changes: 3 additions & 1 deletion Models/GroceryPurchasedModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,12 @@ public class GroceryPurchasedModel : IGroceryPurchasedModel
public GroceryStoreModel store { get; set; }
public string brand { get; set; }
public string grocery { get; set; }
public decimal quantity { get; set; }
public int quantity { get; set; }
public decimal weight { get; set; }
public DateTime date { get; set; }
public bool onsale { get; set; }
public DateTime? sellByDate { get; set; }
public string section { get; set; }
public string groceryid { get; set; }
}
}
3 changes: 3 additions & 0 deletions Models/IGroceryDueDate.cs
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.CompilerServices;
using System.Threading.Tasks;

namespace GroceriesApi.Models
{
public interface IGroceryDueDate
{
string id { get; set; }
string groceryid { get; set; }
DateTime? sellByDate { get; set; }
}
}
3 changes: 2 additions & 1 deletion Models/IGroceryListModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ public interface IGroceryListModel : IGroceryModel
bool onlist { get; set; }
string section { get; set; }
string brand { get; set; }
decimal quantity { get; set; }
int quantity { get; set; }
decimal weight { get; set; }
}
}
21 changes: 13 additions & 8 deletions Models/IGroceryPurchasedModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,19 @@

namespace GroceriesApi.Models
{
public interface IGroceryPurchasedModel : IGroceryModel, IGroceryDueDate
public interface IGroceryPurchasedModel : IGroceryModel
{
decimal itemprice { get; set; }
decimal totalprice { get; set; }
GroceryStoreModel store { get; set; }
DateTime date { get; set; }
bool onsale { get; set; }
string section { get; set; }

public string id { get; set; }
public string groceryid { get; set; }
public decimal itemprice { get; set; }
public decimal totalprice { get; set; }
public GroceryStoreModel store { get; set; }
public string brand { get; set; }
public string section { get; set; }
public int quantity { get; set; }
public decimal weight { get; set; }
public DateTime date { get; set; }
public bool onsale { get; set; }

}
}

0 comments on commit 5c97a7b

Please sign in to comment.