PIbd-22 Isaeva A.I. Lab work 1 Hard #3

Closed
dex_moth wants to merge 5 commits from lab1_hard into lab1
10 changed files with 135 additions and 4 deletions
Showing only changes of commit e97e7a3218 - Show all commits

View File

@ -0,0 +1,18 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using FishFactoryDataModel.Models;
namespace FishFactoryContracts.BindingModels
{
public class ShopBindingModel
{
public int Id { get; set; }
public string ShopName { get; set; } = string.Empty;
public string Adress { get; set; } = string.Empty;
public DateTime OpeningDate { get; set; } = DateTime.Now;
public Dictionary<int, (ICannedModel, int)> ShopCanneds { get; set; } = new();
}
}

View File

@ -0,0 +1,15 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace FishFactoryContracts.BindingModels
{
public class ShopCannedBindingModel
{
public int ShopId { get; set; }
public int CannedId { get; set; }
public int Count { get; set; }
}
}

View File

@ -0,0 +1,21 @@
using FishFactoryContracts.BindingModels;
using FishFactoryContracts.SearchModels;
using FishFactoryContracts.ViewModels;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace FishFactoryContracts.BusinessLogicsContracts
{
public interface IShopLogic
{
List<ShopViewModel>? ReadList(ShopSearchModel? model);
ShopViewModel? ReadElement(ShopSearchModel model);
bool Create(ShopBindingModel model);
bool Update(ShopBindingModel model);
bool Delete(ShopBindingModel model);
bool MakeSupply(ShopCannedBindingModel model);
}
}

View File

@ -0,0 +1,14 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace FishFactoryContracts.SearchModels
{
internal class ShopSearchModel
{
punlic int? Id { get; set; }
public string ShopName { get; set; }
}
}

View File

@ -0,0 +1,12 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace FishFactoryContracts.StoragesContracts
{
internal interface IShopCannedStorage
{
}
}

View File

@ -0,0 +1,12 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace FishFactoryContracts.StoragesContracts
{
public interface IShopStorage
{
}
}

View File

@ -0,0 +1,12 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace FishFactoryContracts.ViewModels
{
internal class ShopViewModel
{
}
}

View File

@ -7,8 +7,4 @@
<Platforms>AnyCPU;x86</Platforms>
</PropertyGroup>
<ItemGroup>
<Folder Include="Models\" />
</ItemGroup>
</Project>

View File

@ -0,0 +1,15 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace FishFactoryDataModel.Models
{
public interface IShopCannedModel
{
int ShopId { get; }
int CannedId { get; }
int Count { get; }
}
}

View File

@ -0,0 +1,16 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace FishFactoryDataModel.Models
{
public interface IShopModel : IId
{
string ShopName { get; }
string Adress { get; }
DateTime OpeningDate { get; }
Dictionary<int, (ICannedModel, int)> ShopCanneds { get; }
}
}