using BeWo.Data.Entities;
using BS.Shared;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace BeWo.Data.Utils
{
public class ServiceRecord2SignatureStates
{
public ServiceRecord ServiceRecord { get; }
public SignatureStateType? SingleSignatureStateType { get; set; }
public SignatureStateType? CustomerMonthlySignatureStateType { get; set; }
public SignatureStateType? EmployeeMonthlySignatreStateType { get; set; }
///
/// Erzeugt das Objekt mit den SignatureStates. Wird als Wert eines States null übergeben, wird beim Erzeugen des ServiceRecordHistory-Eintrags der Wert des vorherigen ServiceRecordHistory-Eintrags genommen, falls vorhanden.
///
///
///
///
///
public ServiceRecord2SignatureStates(ServiceRecord serviceRecord, SignatureStateType? singleSignatureStateType, SignatureStateType? customerMonthlySignatureStateType, SignatureStateType? employeeMonthlySignatreStateType)
{
ServiceRecord = serviceRecord;
SingleSignatureStateType = singleSignatureStateType;
CustomerMonthlySignatureStateType = customerMonthlySignatureStateType;
EmployeeMonthlySignatreStateType = employeeMonthlySignatreStateType;
}
public override bool Equals(object obj)
{
if (obj is ServiceRecord2SignatureStates sr2Ss && sr2Ss.ServiceRecord != null)
{
return ServiceRecord?.Equals(sr2Ss.ServiceRecord) ?? false;
}
return false;
}
}
}