стадия contracts
This commit is contained in:
parent
30f244c552
commit
e97e7a3218
18
FishFactoryContracts/BindingModels/ShopBindingModel.cs
Normal file
18
FishFactoryContracts/BindingModels/ShopBindingModel.cs
Normal 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();
|
||||||
|
}
|
||||||
|
}
|
15
FishFactoryContracts/BindingModels/ShopCannedBindingModel.cs
Normal file
15
FishFactoryContracts/BindingModels/ShopCannedBindingModel.cs
Normal 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; }
|
||||||
|
}
|
||||||
|
}
|
21
FishFactoryContracts/BusinessLogicsContracts/IShopLogic.cs
Normal file
21
FishFactoryContracts/BusinessLogicsContracts/IShopLogic.cs
Normal 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);
|
||||||
|
}
|
||||||
|
}
|
14
FishFactoryContracts/SearchModels/ShopSearchModel.cs
Normal file
14
FishFactoryContracts/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 FishFactoryContracts.SearchModels
|
||||||
|
{
|
||||||
|
internal class ShopSearchModel
|
||||||
|
{
|
||||||
|
punlic int? Id { get; set; }
|
||||||
|
public string ShopName { get; set; }
|
||||||
|
}
|
||||||
|
}
|
12
FishFactoryContracts/StoragesContracts/IShopCannedStorage.cs
Normal file
12
FishFactoryContracts/StoragesContracts/IShopCannedStorage.cs
Normal 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
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
12
FishFactoryContracts/StoragesContracts/IShopStorage.cs
Normal file
12
FishFactoryContracts/StoragesContracts/IShopStorage.cs
Normal 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
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
12
FishFactoryContracts/ViewModels/ShopViewModel.cs
Normal file
12
FishFactoryContracts/ViewModels/ShopViewModel.cs
Normal 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
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
@ -7,8 +7,4 @@
|
|||||||
<Platforms>AnyCPU;x86</Platforms>
|
<Platforms>AnyCPU;x86</Platforms>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
|
||||||
<Folder Include="Models\" />
|
|
||||||
</ItemGroup>
|
|
||||||
|
|
||||||
</Project>
|
</Project>
|
||||||
|
15
FishFactoryDataModels/Models/IShopCannedModel.cs
Normal file
15
FishFactoryDataModels/Models/IShopCannedModel.cs
Normal 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; }
|
||||||
|
}
|
||||||
|
}
|
16
FishFactoryDataModels/Models/IShopModel.cs
Normal file
16
FishFactoryDataModels/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 FishFactoryDataModel.Models
|
||||||
|
{
|
||||||
|
public interface IShopModel : IId
|
||||||
|
{
|
||||||
|
string ShopName { get; }
|
||||||
|
string Adress { get; }
|
||||||
|
DateTime OpeningDate { get; }
|
||||||
|
Dictionary<int, (ICannedModel, int)> ShopCanneds { get; }
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user