Client and implementer
This commit is contained in:
parent
cba5b48efb
commit
d58315a99e
@ -0,0 +1,14 @@
|
||||
using ElectronicsShopDataModels.Models;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace ElectronicsShopContracts.BindingModels {
|
||||
public class ClientBindingModel : IClientModel {
|
||||
public int UserID { get; set; }
|
||||
|
||||
public string Email { get; set; } = string.Empty;
|
||||
}
|
||||
}
|
@ -0,0 +1,15 @@
|
||||
using ElectronicsShopDataModels.Enums;
|
||||
using ElectronicsShopDataModels.Models;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace ElectronicsShopContracts.BindingModels {
|
||||
public class ImplementerBindingModel : IImplementerModel {
|
||||
public int UserID { get; set; }
|
||||
|
||||
public Quakifications Qualification { get; set; } = Quakifications.Отсутствует;
|
||||
}
|
||||
}
|
@ -12,18 +12,17 @@ namespace ElectronicsShopContracts.BindingModels
|
||||
{
|
||||
public int ID { get; set; }
|
||||
public int UserID { get; set; }
|
||||
|
||||
public double Sum { get; set; }
|
||||
public int? ImplementerID { get; set; }
|
||||
public int PaymentID { get; set; }
|
||||
public double Sum { get; set; }
|
||||
|
||||
public OrderStatus Status { get; set; } = OrderStatus.Неизвестен;
|
||||
|
||||
public PaymeantOption PaymeantOption { get; set; } = PaymeantOption.Неизвестно;
|
||||
|
||||
public DateTime DateCreate { get; set; } = DateTime.Now;
|
||||
|
||||
public DateTime? DateImplement { get; set; }
|
||||
|
||||
public Dictionary<int, (IProductModel, int)> ProductList { get; set; } = new();
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -8,25 +8,12 @@ using System.Threading.Tasks;
|
||||
|
||||
namespace ElectronicsShopContracts.BindingModels
|
||||
{
|
||||
public class UserBindingModel : IUserModel
|
||||
{
|
||||
//ID пользователя
|
||||
public int ID { get; set; }
|
||||
//ID роли (клиент)
|
||||
public int RoleID { get; set; }
|
||||
public class UserBindingModel : IUserModel {
|
||||
public int ID { get; set; }
|
||||
|
||||
|
||||
public string FirstName { get; set; } = string.Empty;
|
||||
|
||||
public string LastName { get; set; } = string.Empty;
|
||||
|
||||
public string Login { get; set; } = string.Empty;
|
||||
|
||||
public string Email { get; set; } = string.Empty;
|
||||
|
||||
public string Password { get; set; } = string.Empty;
|
||||
|
||||
public string PhoneNumber { get; set; } = string.Empty;
|
||||
|
||||
}
|
||||
public int RoleID { get; set; }
|
||||
public string UserFIO { get; set; } = string.Empty;
|
||||
public string Password { get; set; } = string.Empty;
|
||||
public string Login { get; set; } = string.Empty;
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,19 @@
|
||||
using ElectronicsShopContracts.BindingModels;
|
||||
using ElectronicsShopContracts.SearchModels;
|
||||
using ElectronicsShopContracts.ViewModels;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace ElectronicsShopContracts.BusinessLogicContracts {
|
||||
public interface IClientLogic {
|
||||
List<ClientViewModel>? ReadList(ClientSearchModel? model);
|
||||
ClientViewModel? ReadElemet(ClientSearchModel model);
|
||||
|
||||
bool Add(ClientBindingModel model);
|
||||
bool Update(ClientBindingModel model);
|
||||
bool Delete(ClientBindingModel model);
|
||||
}
|
||||
}
|
@ -0,0 +1,19 @@
|
||||
using ElectronicsShopContracts.BindingModels;
|
||||
using ElectronicsShopContracts.SearchModels;
|
||||
using ElectronicsShopContracts.ViewModels;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace ElectronicsShopContracts.BusinessLogicContracts {
|
||||
public interface IImplementerLogic {
|
||||
List<ImplementerViewModel>? ReadList(ImplementerSearchModel? model);
|
||||
ImplementerViewModel? ReadElemet(ImplementerSearchModel model);
|
||||
|
||||
bool Add(ImplementerBindingModel model);
|
||||
bool Update(ImplementerBindingModel model);
|
||||
bool Delete(ImplementerBindingModel model);
|
||||
}
|
||||
}
|
@ -12,6 +12,7 @@ namespace ElectronicsShopContracts.BusinessLogicContracts
|
||||
public interface IOrderLogic
|
||||
{
|
||||
List<OrderViewModel>? ReadList(OrderSearchModel? model);
|
||||
OrderViewModel? ReadElement(OrderSearchModel model);
|
||||
|
||||
bool CreateOrder(OrderBindingModel model);
|
||||
bool TakeOrderInWork(OrderBindingModel model);
|
||||
|
@ -12,7 +12,7 @@ namespace ElectronicsShopContracts.BusinessLogicContracts
|
||||
public interface IUserLogic
|
||||
{
|
||||
List<UserViewModel>? ReadList(UserSearchModel? model);
|
||||
UserViewModel? ReadElemet(UserSearchModel? model);
|
||||
UserViewModel? ReadElemet(UserSearchModel model);
|
||||
|
||||
bool Add(UserBindingModel model);
|
||||
bool Update(UserBindingModel model);
|
||||
|
@ -0,0 +1,11 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace ElectronicsShopDataModels.Enums {
|
||||
public enum Quakifications {
|
||||
Отсутствует = -1
|
||||
}
|
||||
}
|
@ -0,0 +1,12 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace ElectronicsShopDataModels.Models {
|
||||
public interface IClientModel {
|
||||
int UserID { get; }
|
||||
string Email { get; }
|
||||
}
|
||||
}
|
@ -0,0 +1,13 @@
|
||||
using ElectronicsShopDataModels.Enums;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace ElectronicsShopDataModels.Models {
|
||||
public interface IImplementerModel {
|
||||
int UserID { get; }
|
||||
Quakifications Qualification { get; }
|
||||
}
|
||||
}
|
@ -10,9 +10,9 @@ namespace ElectronicsShopDataModels.Models
|
||||
public interface IOrderModel : IID
|
||||
{
|
||||
int UserID { get; }
|
||||
int ImplementerID { get; }
|
||||
int? ImplementerID { get; }
|
||||
int PaymentID { get; }
|
||||
OrderStatus OrderStatus { get; }
|
||||
OrderStatus Status { get; }
|
||||
PaymeantOption PaymeantOption { get; }
|
||||
DateTime DateCreate { get; }
|
||||
DateTime? DateImplement { get; }
|
||||
|
@ -8,14 +8,10 @@ namespace ElectronicsShopDataModels
|
||||
{
|
||||
public interface IUserModel : IID
|
||||
{
|
||||
//ID role
|
||||
int RoleID { get; }
|
||||
|
||||
string FirstName { get; }
|
||||
string LastName { get; }
|
||||
string UserFIO { get; }
|
||||
string Password { get; }
|
||||
string PhoneNumber { get; }
|
||||
string Login { get; }
|
||||
string Email { get; }
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user