diff --git a/ConfectioneryContracts/BindingModels/ShopBindingModel.cs b/ConfectioneryContracts/BindingModels/ShopBindingModel.cs index 764dc63..991d04b 100644 --- a/ConfectioneryContracts/BindingModels/ShopBindingModel.cs +++ b/ConfectioneryContracts/BindingModels/ShopBindingModel.cs @@ -1,12 +1,22 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; +using ConfectioneryDataModels; +using ConfectioneryDataModels.Models; namespace ConfectioneryContracts.BindingModels { - internal interface ShopBindingModel + public class ShopBindingModel : IShopModel { + public string Name { get; set; } = string.Empty; + + public string Address { get; set; } = string.Empty; + + public DateTime DateOpening { get; set; } = DateTime.Now; + + public Dictionary Pastries + { + get; + set; + } = new(); + + public int Id { get; set; } } } diff --git a/ConfectioneryContracts/ViewModels/ShopViewModel.cs b/ConfectioneryContracts/ViewModels/ShopViewModel.cs index dbfc7c6..dd01f43 100644 --- a/ConfectioneryContracts/ViewModels/ShopViewModel.cs +++ b/ConfectioneryContracts/ViewModels/ShopViewModel.cs @@ -1,12 +1,26 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; +using ConfectioneryDataModels; +using ConfectioneryDataModels.Models; +using System.ComponentModel; namespace ConfectioneryContracts.ViewModels { - internal class ShopViewModel + public class ShopViewModel : IShopModel { + [DisplayName("Название магазина")] + public string Name { get; set; } = string.Empty; + + [DisplayName("Адрес магазина")] + public string Address { get; set; } = string.Empty; + + [DisplayName("Время открытия")] + public DateTime DateOpening { get; set; } = DateTime.Now; + + public Dictionary Pastries + { + get; + set; + } = new(); + + public int Id { get; set; } } } diff --git a/ConfectioneryDataModels/IShopModel.cs b/ConfectioneryDataModels/IShopModel.cs index 7315e2f..1f1e07f 100644 --- a/ConfectioneryDataModels/IShopModel.cs +++ b/ConfectioneryDataModels/IShopModel.cs @@ -1,12 +1,12 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; +using ConfectioneryDataModels.Models; namespace ConfectioneryDataModels { - internal interface IShopModel + public interface IShopModel : IId { + string Name { get; } + string Address { get; } + DateTime DateOpening { get; } + Dictionary Pastries { get; } } }