2023-05-19 18:09:36 +04:00
|
|
|
|
using CaseAccountingContracts.ViewModels;
|
|
|
|
|
using CaseAccountingDataModels.Models;
|
|
|
|
|
using Newtonsoft.Json;
|
2023-03-26 19:25:49 +04:00
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Text;
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
|
|
|
|
|
namespace CaseAccountingContracts.BindingModels
|
|
|
|
|
{
|
|
|
|
|
public class DealBindingModel : IDealModel
|
|
|
|
|
{
|
|
|
|
|
public string Subject { get; set; } = string.Empty;
|
|
|
|
|
|
|
|
|
|
public string Responsibilities { get; set; } = string.Empty;
|
|
|
|
|
|
|
|
|
|
public DateTime Date { get; set; } = DateTime.SpecifyKind(DateTime.Now, DateTimeKind.Utc);
|
|
|
|
|
|
2023-04-01 19:39:50 +04:00
|
|
|
|
public int UserId { get; set; }
|
|
|
|
|
|
2023-03-26 19:25:49 +04:00
|
|
|
|
public int Id { get; set; }
|
2023-04-08 19:01:51 +04:00
|
|
|
|
|
|
|
|
|
public Dictionary<int, ICaseModel> Cases { get; set; } = new();
|
2023-05-19 18:09:36 +04:00
|
|
|
|
|
|
|
|
|
public List<CaseViewModel> CaseViewModels { get; set; } = new();
|
|
|
|
|
|
|
|
|
|
public DealBindingModel() { }
|
|
|
|
|
|
|
|
|
|
[JsonConstructor]
|
|
|
|
|
public DealBindingModel(Dictionary<int, CaseViewModel> Cases)
|
|
|
|
|
{
|
|
|
|
|
this.Cases = Cases.ToDictionary(x => x.Key, x => (ICaseModel)x.Value);
|
|
|
|
|
}
|
2023-03-26 19:25:49 +04:00
|
|
|
|
}
|
|
|
|
|
}
|