Таков выбор врат Штейна..

This commit is contained in:
Safgerd 2023-04-05 21:24:46 +04:00
parent 7d2196d4e8
commit e0a3c1e1fd
17 changed files with 217 additions and 5 deletions

View File

@ -0,0 +1,17 @@
using ComputerStoreDataModels.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ComputerStoreContracts.BindingModels
{
public class ConsignmentBindingModel : IConsignmentModel
{
public int OrderID { get; set; }
public int ProductID { get; set; }
public double Price { get; set; }
public int Count { get; set; }
}
}

View File

@ -0,0 +1,21 @@
using ComputerStoreDataModels.Enums;
using ComputerStoreDataModels.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ComputerStoreContracts.BindingModels
{
public class OrderBindingModel : IOrderModel
{
public int ID { get; set; }
public double Price { get; set; }
public OrderType Type { get; set; } = OrderType.Unknown;
public OrderStatus Status { get; set; } = OrderStatus.Unknown;
public DateTime DateCreate { get; set; } = DateTime.Now;
public DateTime? DateImplement { get; set; }
public int UserID { get; set; }
}
}

View File

@ -0,0 +1,17 @@
using ComputerStoreDataModels.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ComputerStoreContracts.BindingModels
{
public class RequestBindingModel : IRequestModel
{
public int ID { get; set; }
public int OrderID { get; set; }
public double Price { get; set; }
public int Count { get; set; }
}
}

View File

@ -0,0 +1,21 @@
using ComputerStoreDataModels.Enums;
using ComputerStoreDataModels.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ComputerStoreContracts.BindingModels
{
public class UserBindingModel : IUserModel
{
public int ID { get; set; }
public string Username { get; set; } = string.Empty;
public string Password { get; set; } = string.Empty;
public string FirstName { get; set; } = string.Empty;
public string LastName { get; set; } = string.Empty;
public string MiddleName { get; set; } = string.Empty;
public Role Role { get; set; } = Role.Unknown;
}
}

View File

@ -0,0 +1,13 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ComputerStoreContracts.SearchModels
{
public class ConsignmentSearchModel
{
public int? OrderID { get; set; }
}
}

View File

@ -0,0 +1,17 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ComputerStoreContracts.SearchModels
{
public class OrderSearchModel
{
public int? ID { get; set; }
public DateTime? DateFrom { get; set; }
public DateTime? DateTo { get; set; }
//Временно
public int? UserID { get; set; }
}
}

View File

@ -0,0 +1,14 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ComputerStoreContracts.SearchModels
{
public class RequestSearchModel
{
public int? ID { get; set; }
public int? OrderID { get; set; }
}
}

View File

@ -0,0 +1,15 @@
using ComputerStoreDataModels.Enums;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ComputerStoreContracts.SearchModels
{
public class UserSearchModel
{
public int? ID { get; set; }
public string? Username { get; set; }
}
}

View File

@ -0,0 +1,22 @@
using ComputerStoreDataModels.Models;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ComputerStoreContracts.ViewModels
{
public class ConsignmentViewModel : IConsignmentModel
{
[DisplayName("Order ID")]
public int OrderID { get; }
[DisplayName("Product ID")]
public int ProductID { get; }
[DisplayName("Price")]
public double Price { get; }
[DisplayName("Count")]
public int Count { get; }
}
}

View File

@ -0,0 +1,29 @@
using ComputerStoreDataModels.Enums;
using ComputerStoreDataModels.Models;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ComputerStoreContracts.ViewModels
{
public class OrderViewModel : IOrderModel
{
[DisplayName("Order ID")]
public int ID { get; set; }
[DisplayName("Price")]
public double Price { get; set; }
[DisplayName("Type of order")]
public OrderType Type { get; set; }
[DisplayName("Status")]
public OrderStatus Status { get; set; }
[DisplayName("Creation date")]
public DateTime DateCreate { get; set; }
[DisplayName("Implementation date")]
public DateTime? DateImplement { get; set; }
[DisplayName("User ID")]
public int UserID { 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 ComputerStoreContracts.ViewModels
{
internal class RequestViewModel
{
}
}

View File

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

View File

@ -8,6 +8,7 @@ namespace ComputerStoreDataModels.Enums
{
public enum OrderType
{
Unknown = -1,
Consigment = 0,
Request = 1
}

View File

@ -6,8 +6,9 @@ using System.Threading.Tasks;
namespace ComputerStoreDataModels.Enums
{
public enum EmployeeRole
public enum Role
{
Unknown = -1,
Guarantor = 0,
Cotnractor = 1
}

View File

@ -1,4 +1,5 @@
using System;
using ComputerStoreDataModels.Enums;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

View File

@ -6,10 +6,9 @@ using System.Threading.Tasks;
namespace ComputerStoreDataModels.Models
{
public interface IRequestModel
public interface IRequestModel : IID
{
int OrderID { get; }
int PCID { get; }
double Price { get; }
int Count { get; }
}

View File

@ -15,6 +15,6 @@ namespace ComputerStoreDataModels.Models
string FirstName { get; }
string LastName { get; }
string MiddleName { get; }
EmployeeRole Role { get; }
Role Role { get; }
}
}