43 lines
1.1 KiB
C#
43 lines
1.1 KiB
C#
using CaseAccountingContracts.ViewModels;
|
|
using CaseAccountingDataModels.Models;
|
|
using Newtonsoft.Json;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Net;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace CaseAccountingContracts.BindingModels
|
|
{
|
|
public class LawyerBindingModel : ILawyerModel
|
|
{
|
|
public string Name { get; set; } = string.Empty;
|
|
|
|
public string Surname { get; set; } = string.Empty;
|
|
|
|
public string Patronymic { get; set; } = string.Empty;
|
|
|
|
public int Experience { get; set; }
|
|
|
|
public int? SpecializationId { get; set; }
|
|
|
|
public int UserId { get; set; }
|
|
|
|
public int Id { get; set; }
|
|
|
|
public Dictionary<int, IContractModel> Contracts { get; set; } = new();
|
|
|
|
public List<ContractViewModel> ContractViewModels { get; set; } = new();
|
|
|
|
public LawyerBindingModel() { }
|
|
|
|
[JsonConstructor]
|
|
public LawyerBindingModel(Dictionary<int, ContractViewModel> Contracts)
|
|
{
|
|
this.Contracts = Contracts.ToDictionary(x => x.Key, x => (IContractModel)x.Value);
|
|
}
|
|
|
|
}
|
|
}
|