Создание моделей магазина
This commit is contained in:
parent
a882155736
commit
a80b2b19fd
22
LawFirm/LawFirmContracts/BindingModels/ShopBindingModel.cs
Normal file
22
LawFirm/LawFirmContracts/BindingModels/ShopBindingModel.cs
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
using LawFirmDataModels.Models;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace LawFirmContracts.BindingModels
|
||||||
|
{
|
||||||
|
public class ShopBindingModel : IShopModel
|
||||||
|
{
|
||||||
|
public string Name { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
public string Adress { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
public DateTime OpeningDate { get; set; }
|
||||||
|
|
||||||
|
public Dictionary<int, (IDocumentModel, int)> ShopDocuments { get; set; } = new();
|
||||||
|
|
||||||
|
public int Id { get; set; }
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,12 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace LawFirmContracts.BusinessLogicContracts
|
||||||
|
{
|
||||||
|
internal interface IShopLogic
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
14
LawFirm/LawFirmContracts/SearchModels/ShopSearchModel.cs
Normal file
14
LawFirm/LawFirmContracts/SearchModels/ShopSearchModel.cs
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace LawFirmContracts.SearchModels
|
||||||
|
{
|
||||||
|
public class ShopSearchModel
|
||||||
|
{
|
||||||
|
public int? Id { get; set; }
|
||||||
|
public string? Name { get; set; }
|
||||||
|
}
|
||||||
|
}
|
24
LawFirm/LawFirmContracts/ViewModels/ShopViewModel.cs
Normal file
24
LawFirm/LawFirmContracts/ViewModels/ShopViewModel.cs
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
using LawFirmDataModels.Models;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.ComponentModel;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace LawFirmContracts.ViewModels
|
||||||
|
{
|
||||||
|
internal class ShopViewModel : IShopModel
|
||||||
|
{
|
||||||
|
[DisplayName("Название магазина")]
|
||||||
|
public string Name { get; set; } = string.Empty;
|
||||||
|
[DisplayName("Адрес")]
|
||||||
|
public string Adress { get; set; } = string.Empty;
|
||||||
|
[DisplayName("Дата открытия")]
|
||||||
|
public DateTime OpeningDate { get; set; }
|
||||||
|
|
||||||
|
public Dictionary<int, (IDocumentModel, int)> ShopDocuments { get; set; } = new();
|
||||||
|
|
||||||
|
public int Id { get; set; }
|
||||||
|
}
|
||||||
|
}
|
16
LawFirm/LawFirmDataModels/Models/IShopModel.cs
Normal file
16
LawFirm/LawFirmDataModels/Models/IShopModel.cs
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace LawFirmDataModels.Models
|
||||||
|
{
|
||||||
|
public interface IShopModel : IId
|
||||||
|
{
|
||||||
|
String Name { get; }
|
||||||
|
String Adress { get; }
|
||||||
|
DateTime OpeningDate { get; }
|
||||||
|
Dictionary<int, (IDocumentModel, int)> ShopDocuments { get; }
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user