2023-03-19 16:41:07 +04:00
|
|
|
|
using ConfectioneryContracts.Attributes;
|
|
|
|
|
using ConfectioneryDataModels;
|
2023-02-05 15:14:18 +04:00
|
|
|
|
using ConfectioneryDataModels.Models;
|
|
|
|
|
using System.ComponentModel;
|
2023-02-05 14:44:03 +04:00
|
|
|
|
|
|
|
|
|
namespace ConfectioneryContracts.ViewModels
|
|
|
|
|
{
|
2023-02-05 15:14:18 +04:00
|
|
|
|
public class ShopViewModel : IShopModel
|
2023-02-05 14:44:03 +04:00
|
|
|
|
{
|
2023-03-19 16:41:07 +04:00
|
|
|
|
[Column("Название магазина", gridViewAutoSize: GridViewAutoSize.AllCells, isUseAutoSize: true)]
|
2023-02-05 15:14:18 +04:00
|
|
|
|
public string Name { get; set; } = string.Empty;
|
|
|
|
|
|
2023-03-19 16:41:07 +04:00
|
|
|
|
[Column("Адрес магазина", gridViewAutoSize: GridViewAutoSize.Fill, isUseAutoSize: true)]
|
2023-02-05 15:14:18 +04:00
|
|
|
|
public string Address { get; set; } = string.Empty;
|
|
|
|
|
|
2023-03-19 16:41:07 +04:00
|
|
|
|
[Column("Максимальное количество изделий в магазине", gridViewAutoSize: GridViewAutoSize.DisplayedCells, isUseAutoSize: true)]
|
2023-02-15 05:47:23 +04:00
|
|
|
|
public int MaxCountPastries { get; set; }
|
|
|
|
|
|
2023-03-19 16:41:07 +04:00
|
|
|
|
[Column("Время открытия", gridViewAutoSize: GridViewAutoSize.AllCells, isUseAutoSize: true, format: "f")]
|
2023-02-05 15:14:18 +04:00
|
|
|
|
public DateTime DateOpening { get; set; } = DateTime.Now;
|
|
|
|
|
|
2023-03-19 16:41:07 +04:00
|
|
|
|
[Column(visible: false)]
|
2023-02-05 15:15:38 +04:00
|
|
|
|
public Dictionary<int, (IPastryModel, int)> Pastries
|
2023-02-05 15:14:18 +04:00
|
|
|
|
{
|
|
|
|
|
get;
|
|
|
|
|
set;
|
|
|
|
|
} = new();
|
|
|
|
|
|
2023-03-19 16:41:07 +04:00
|
|
|
|
[Column(visible: false)]
|
2023-02-05 15:14:18 +04:00
|
|
|
|
public int Id { get; set; }
|
2023-02-15 05:47:23 +04:00
|
|
|
|
|
2023-02-05 14:44:03 +04:00
|
|
|
|
}
|
|
|
|
|
}
|