Store Updated
Store Updated
using System.Collections.Generic;
using System.IO;
using System.Security.Cryptography.X509Certificates;
using System.Text;
using Newtonsoft.Json;
//using Newtonsoft.Json.Serialization;
namespace ICT711_Day5_classes
{
public class Store : IStore
{
public string StoreName { get; set; }
public string Address { get; set; }
[JsonIgnore] // Don't store this data inside the store file. Will be stored in a separate file
public List<ICustomer> Customers { get; set; }
[JsonIgnore] // Don't store this data inside the store file. Will be stored in a separate file
public List<IAssociate> Associates { get; set; }
[JsonIgnore] // Don't store this data inside the store file. Will be stored in a separate file
public Inventory Inventory { get; set; }
[JsonIgnore] // Don't store this data inside the store file. Will be stored in a separate file
public List<ISale> Sales { get; set; }
[JsonProperty]
public static string AssociatesFileName { get; set; } = "associates.json";
[JsonProperty]
public static string CustomersFileName { get; set; } = "customers.json";
[JsonProperty]
public static string InventoryFileName { get; set; } = "inventory.json";
[JsonProperty]
public static string SalesFileName { get; set; } = "sales.json";
public static string StoreFileName { get; set; } = "store.json";
public Store()
{
this.StoreName = "New Store Name"; //JEN: Added
this.Address = "Somewhere address"; //JEN: Added
}
}
}
}