forked from slavaxom9k/PIBD-23_Fomichev_V.S._MagicCarpet
правки
This commit is contained in:
@@ -27,7 +27,7 @@ internal class EmployeeStorageContract : IEmployeeStorageContract
|
||||
_mapper = new Mapper(config);
|
||||
}
|
||||
|
||||
public List<EmployeeDataModel> GetList(bool onlyActive = true, string? postId = null, DateTime? fromBirthDate = null, DateTime? toBirthDate = null,
|
||||
public List<EmployeeDataModel> GetList(bool onlyActive = true, string? email = null, DateTime? fromBirthDate = null, DateTime? toBirthDate = null,
|
||||
DateTime? fromEmploymentDate = null, DateTime? toEmploymentDate = null)
|
||||
{
|
||||
try
|
||||
@@ -37,9 +37,9 @@ internal class EmployeeStorageContract : IEmployeeStorageContract
|
||||
{
|
||||
query = query.Where(x => !x.IsDeleted);
|
||||
}
|
||||
if (postId is not null)
|
||||
if (email is not null)
|
||||
{
|
||||
query = query.Where(x => x.PostId == postId);
|
||||
query = query.Where(x => x.PostId == email);
|
||||
}
|
||||
if (fromBirthDate is not null && toBirthDate is not null)
|
||||
{
|
||||
|
||||
@@ -13,9 +13,9 @@ internal class Employee
|
||||
|
||||
public required string FIO { get; set; }
|
||||
|
||||
public string Email { get; set; }
|
||||
public required string PostId { get; set; }
|
||||
|
||||
public required string PostId { get; set; }
|
||||
public string? Email { get; set; }
|
||||
|
||||
public DateTime BirthDate { get; set; }
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ namespace MagicCarpetDatabase.Models;
|
||||
|
||||
internal class Salary
|
||||
{
|
||||
public required string Id { get; set; } = Guid.NewGuid().ToString();
|
||||
public string Id { get; set; } = Guid.NewGuid().ToString();
|
||||
public required string EmployeeId { get; set; }
|
||||
public DateTime SalaryDate { get; set; }
|
||||
public double EmployeeSalary { get; set; }
|
||||
|
||||
@@ -11,14 +11,14 @@ namespace MagicCarpetDatabase.Models;
|
||||
|
||||
internal class Sale
|
||||
{
|
||||
public required string Id { get; set; }
|
||||
public string Id { get; set; } = Guid.NewGuid().ToString();
|
||||
|
||||
public required string EmployeeId { get; set; }
|
||||
|
||||
public string? ClientId { get; set; }
|
||||
|
||||
public DateTime SaleDate { get; set; }
|
||||
public double Sum { get; private set; }
|
||||
public double Sum { get; set; }
|
||||
|
||||
public DiscountType DiscountType { get; set; }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user