This commit is contained in:
Данияр Аглиуллов 2023-02-05 15:14:18 +04:00
parent 2aa903dd99
commit 873df1007e
3 changed files with 42 additions and 18 deletions

View File

@ -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<int, (IShopModel, int)> Pastries
{
get;
set;
} = new();
public int Id { get; set; }
}
}

View File

@ -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<int, (IShopModel, int)> Pastries
{
get;
set;
} = new();
public int Id { get; set; }
}
}

View File

@ -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<int, (IShopModel, int)> Pastries { get; }
}
}