169 lines
5.7 KiB
C#
169 lines
5.7 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using CompanyManagment.App.Contracts.InstitutionContract;
|
|
using CompanyManagment.App.Contracts.InstitutionContractContactinfo;
|
|
using MongoDB.Bson;
|
|
using MongoDB.Bson.Serialization.Attributes;
|
|
|
|
namespace Company.Domain.InstitutionContractExtensionTempAgg;
|
|
|
|
public class InstitutionContractExtensionTemp
|
|
{
|
|
public InstitutionContractExtensionTemp(long previousContractingPartyId)
|
|
{
|
|
Id = Guid.NewGuid();
|
|
PreviousId = previousContractingPartyId;
|
|
}
|
|
|
|
[BsonId] // Specifies this field as the _id in MongoDB
|
|
[BsonRepresentation(BsonType.String)] // Ensures the GUID is stored as a string
|
|
public Guid Id { get; set; }
|
|
public long PreviousId { get; set; }
|
|
public string Address { get; set; }
|
|
public string City { get; set; }
|
|
public string Province { get; set; }
|
|
public List<EditContactInfo> ContactInfos { get; set; }
|
|
|
|
public List<InstitutionContractExtensionTempWorkshop> Workshops { get; set; }
|
|
|
|
public InstitutionContractExtensionPlanDetail OneMonth { get; set; }
|
|
public InstitutionContractExtensionPlanDetail ThreeMonths { get; set; }
|
|
public InstitutionContractExtensionPlanDetail SixMonths { get; set; }
|
|
public InstitutionContractExtensionPlanDetail TwelveMonths { get; set; }
|
|
public InstitutionContractPaymentMonthlyViewModel MonthlyPayment { get; set; }
|
|
public InstitutionContractPaymentOneTimeViewModel OneTimePayment { get; set; }
|
|
|
|
public bool HasContractInPerson { get; set; }
|
|
|
|
public InstitutionContractDuration? Duration { get; set; }
|
|
|
|
public void SetContractingPartyInfos(string address, string city, string province, List<EditContactInfo> contactInfos)
|
|
{
|
|
Address = address;
|
|
City = city;
|
|
Province = province;
|
|
ContactInfos = contactInfos;
|
|
}
|
|
|
|
public void SetWorkshopsAndPlanAmounts(List<InstitutionContractExtensionTempWorkshop> workshops,
|
|
InstitutionContractExtensionPlanDetail oneMonth,
|
|
InstitutionContractExtensionPlanDetail threeMonth, InstitutionContractExtensionPlanDetail sixMonth,
|
|
InstitutionContractExtensionPlanDetail twelveMonth, bool hasContractInPerson)
|
|
{
|
|
Workshops = workshops;
|
|
OneMonth = oneMonth;
|
|
ThreeMonths = threeMonth;
|
|
SixMonths = sixMonth;
|
|
TwelveMonths = twelveMonth;
|
|
HasContractInPerson = hasContractInPerson;
|
|
}
|
|
|
|
public void SetAmountAndDuration(InstitutionContractDuration duration,InstitutionContractPaymentMonthlyViewModel monthly,
|
|
InstitutionContractPaymentOneTimeViewModel oneTime)
|
|
{
|
|
Duration = duration;
|
|
MonthlyPayment = monthly;
|
|
OneTimePayment = oneTime;
|
|
}
|
|
|
|
}
|
|
|
|
public class InstitutionContractExtenstionTempPlan
|
|
{
|
|
public InstitutionContractExtenstionTempPlan(string contractStart, string contractEnd,
|
|
string oneMonthPaymentDiscounted, string oneMonthDiscount, string oneMonthOriginalPayment,
|
|
string totalPayment, string dailyCompensation, string obligation)
|
|
{
|
|
ContractStart = contractStart;
|
|
ContractEnd = contractEnd;
|
|
OneMonthPaymentDiscounted = oneMonthPaymentDiscounted;
|
|
OneMonthDiscount = oneMonthDiscount;
|
|
OneMonthOriginalPayment = oneMonthOriginalPayment;
|
|
TotalPayment = totalPayment;
|
|
DailyCompensation = dailyCompensation;
|
|
Obligation = obligation;
|
|
}
|
|
|
|
public string ContractStart { get; set; }
|
|
public string ContractEnd { get; set; }
|
|
public string OneMonthPaymentDiscounted { get; set; }
|
|
public string OneMonthDiscount { get; set; }
|
|
public string OneMonthOriginalPayment { get; set; }
|
|
public string TotalPayment { get; set; }
|
|
public string DailyCompensation { get; set; }
|
|
public string Obligation { get; set; }
|
|
}
|
|
|
|
public class InstitutionContractExtensionTempWorkshop
|
|
{
|
|
public InstitutionContractExtensionTempWorkshop(string workshopName, int countPerson, bool contractAndCheckout, bool contractAndCheckoutInPerson,
|
|
bool insurance, bool insuranceInPerson,
|
|
bool rollCall,bool rollCallInPerson, bool customizeCheckout,double price,long workshopId)
|
|
{
|
|
WorkshopName = workshopName;
|
|
CountPerson = countPerson;
|
|
ContractAndCheckout = contractAndCheckout;
|
|
Insurance = insurance;
|
|
RollCall = rollCall;
|
|
CustomizeCheckout = customizeCheckout;
|
|
ContractAndCheckoutInPerson = contractAndCheckoutInPerson;
|
|
InsuranceInPerson = insuranceInPerson;
|
|
RollCallInPerson = rollCallInPerson;
|
|
Price = price;
|
|
WorkshopId = workshopId;
|
|
}
|
|
|
|
public long WorkshopId { get; set; }
|
|
|
|
/// <summary>
|
|
/// نام کارگاه
|
|
/// </summary>
|
|
public string WorkshopName { get; private set; }
|
|
|
|
/// <summary>
|
|
/// تعداد پرسنل
|
|
/// </summary>
|
|
public int CountPerson { get; private set; }
|
|
|
|
|
|
#region ServiceSelection
|
|
|
|
/// <summary>
|
|
/// قرارداد و تصفیه
|
|
/// </summary>
|
|
public bool ContractAndCheckout { get; private set; }
|
|
|
|
/// <summary>
|
|
/// بیمه
|
|
/// </summary>
|
|
public bool Insurance { get; private set; }
|
|
|
|
/// <summary>
|
|
/// حضورغباب
|
|
/// </summary>
|
|
public bool RollCall { get; private set; }
|
|
|
|
public bool RollCallInPerson { get; set; }
|
|
|
|
/// <summary>
|
|
/// فیش غیر رسمی
|
|
/// </summary>
|
|
public bool CustomizeCheckout { get;private set; }
|
|
|
|
/// <summary>
|
|
/// خدمات حضوری قرداد و تصفیه
|
|
/// </summary>
|
|
public bool ContractAndCheckoutInPerson { get; private set; }
|
|
|
|
/// <summary>
|
|
/// خدمات حضوری بیمه
|
|
/// </summary>
|
|
public bool InsuranceInPerson { get; private set; }
|
|
|
|
public double Price{ get; set; }
|
|
|
|
#endregion
|
|
}
|
|
|
|
|