fix
This commit is contained in:
parent
2aa903dd99
commit
873df1007e
@ -1,12 +1,22 @@
|
|||||||
using System;
|
using ConfectioneryDataModels;
|
||||||
using System.Collections.Generic;
|
using ConfectioneryDataModels.Models;
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace ConfectioneryContracts.BindingModels
|
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; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,12 +1,26 @@
|
|||||||
using System;
|
using ConfectioneryDataModels;
|
||||||
using System.Collections.Generic;
|
using ConfectioneryDataModels.Models;
|
||||||
using System.Linq;
|
using System.ComponentModel;
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace ConfectioneryContracts.ViewModels
|
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; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,12 +1,12 @@
|
|||||||
using System;
|
using ConfectioneryDataModels.Models;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace ConfectioneryDataModels
|
namespace ConfectioneryDataModels
|
||||||
{
|
{
|
||||||
internal interface IShopModel
|
public interface IShopModel : IId
|
||||||
{
|
{
|
||||||
|
string Name { get; }
|
||||||
|
string Address { get; }
|
||||||
|
DateTime DateOpening { get; }
|
||||||
|
Dictionary<int, (IShopModel, int)> Pastries { get; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user