Новая сущность
This commit is contained in:
parent
9b38a213e3
commit
0bfe8b692c
@ -0,0 +1,17 @@
|
||||
using SoftwareInstallationDataModels.Models;
|
||||
|
||||
namespace SofrwareInstallationContracts.BindingModels
|
||||
{
|
||||
public class StoreBindingModel : IStoreModel
|
||||
{
|
||||
public string StoreName { get; set; } = string.Empty;
|
||||
public string StoreAdress { get; set; } = string.Empty;
|
||||
|
||||
public DateTime OpeningDate { get; set; } = DateTime.Now;
|
||||
|
||||
public Dictionary<int, (IPackageModel, int)> Packages { get; set; } = new ();
|
||||
|
||||
public int Id { get; set; }
|
||||
|
||||
}
|
||||
}
|
@ -0,0 +1,17 @@
|
||||
using SofrwareInstallationContracts.BindingModels;
|
||||
using SofrwareInstallationContracts.SearchModels;
|
||||
using SofrwareInstallationContracts.ViewModels;
|
||||
using SoftwareInstallationDataModels.Models;
|
||||
|
||||
namespace SofrwareInstallationContracts.BusinessLogicsContracts
|
||||
{
|
||||
public interface IStoreLogic
|
||||
{
|
||||
List<StoreViewModel>? ReadList(StoreSearchModel? model);
|
||||
StoreViewModel? ReadElement(StoreSearchModel model);
|
||||
bool Create(StoreBindingModel model);
|
||||
bool Update(StoreBindingModel model);
|
||||
bool Delete(StoreBindingModel model);
|
||||
bool AddPackage(StoreSearchModel model, IPackageModel package, int quantity);
|
||||
}
|
||||
}
|
@ -0,0 +1,8 @@
|
||||
namespace SofrwareInstallationContracts.SearchModels
|
||||
{
|
||||
public class StoreSearchModel
|
||||
{
|
||||
public int? Id { get; set; }
|
||||
public string? StoreName { get; set; }
|
||||
}
|
||||
}
|
@ -0,0 +1,16 @@
|
||||
using SofrwareInstallationContracts.BindingModels;
|
||||
using SofrwareInstallationContracts.SearchModels;
|
||||
using SofrwareInstallationContracts.ViewModels;
|
||||
|
||||
namespace SofrwareInstallationContracts.StoragesContracts
|
||||
{
|
||||
public interface IStoreStorage
|
||||
{
|
||||
List<StoreViewModel> GetFullList();
|
||||
List<StoreViewModel> GetFilteredList(StoreSearchModel model);
|
||||
StoreViewModel? GetElement(StoreSearchModel model);
|
||||
StoreViewModel? Insert(StoreBindingModel model);
|
||||
StoreViewModel? Update(StoreBindingModel model);
|
||||
StoreViewModel? Delete(StoreBindingModel model);
|
||||
}
|
||||
}
|
@ -28,7 +28,5 @@ namespace SofrwareInstallationContracts.ViewModels
|
||||
|
||||
[DisplayName("Дата выполнения")]
|
||||
public DateTime? DateImplement { get; set; }
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,18 @@
|
||||
using SoftwareInstallationDataModels.Models;
|
||||
using System.ComponentModel;
|
||||
|
||||
namespace SofrwareInstallationContracts.ViewModels
|
||||
{
|
||||
public class StoreViewModel : IStoreModel
|
||||
{
|
||||
public Dictionary<int, (IPackageModel, int)> Packages { get; set; } = new();
|
||||
public int Id { get; set; }
|
||||
|
||||
[DisplayName("Название магазина")]
|
||||
public string StoreName { get; set; } = string.Empty;
|
||||
[DisplayName("Адрес магазина")]
|
||||
public string StoreAdress { get; set; } = string.Empty;
|
||||
[DisplayName("Дата открытия")]
|
||||
public DateTime OpeningDate { get; set; } = DateTime.Now;
|
||||
}
|
||||
}
|
@ -0,0 +1,10 @@
|
||||
namespace SoftwareInstallationDataModels.Models
|
||||
{
|
||||
public interface IStoreModel : IId
|
||||
{
|
||||
public string StoreName { get; set; }
|
||||
public string StoreAdress { get; set; }
|
||||
DateTime OpeningDate { get; }
|
||||
Dictionary<int, (IPackageModel, int)> Packages { get; }
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user