using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using _0_Framework.Domain;
using Company.Domain.FinancialStatmentAgg;
namespace Company.Domain.FinancialTransactionAgg;
public class FinancialTransaction : EntityBase
{
public FinancialTransaction(long financialStatementId, DateTime tdateGr, string tdateFa, string description, string typeOfTransaction, string descriptionOption, double deptor, double creditor, double balance)
{
FinancialStatementId = financialStatementId;
TdateGr = tdateGr;
TdateFa = tdateFa;
Description = description;
TypeOfTransaction = typeOfTransaction;
DescriptionOption = descriptionOption;
Deptor = deptor;
Creditor = creditor;
Balance = balance;
SentSms = false;
}
///
/// ایجاد از طرف بک گراند سرویس
///
///
///
///
///
///
///
///
///
///
///
public FinancialTransaction(long financialStatementId, DateTime tdateGr, string tdateFa, string description,
string typeOfTransaction, string descriptionOption, double deptor, double creditor, double balance,
bool sentSms)
{
FinancialStatementId = financialStatementId;
TdateGr = tdateGr;
TdateFa = tdateFa;
Description = description;
TypeOfTransaction = typeOfTransaction;
DescriptionOption = descriptionOption;
Deptor = deptor;
Creditor = creditor;
Balance = balance;
SentSms = sentSms;
}
public long FinancialStatementId { get; private set; }
public DateTime TdateGr { get; private set; }
public string TdateFa { get; private set; }
public string Description { get; private set; }
public string TypeOfTransaction { get; private set; }
public string DescriptionOption { get; private set; }
public double Deptor { get; private set; }
public double Creditor { get; private set; }
public double Balance { get; private set; }
public bool SentSms { get; private set; }
public string MessageText { get; private set; }
public string SentSmsDateFa { get; private set; }
public FinancialStatment FinancialStatment { get; set; }
public void Edit(DateTime tdateGr, string tdateFa, string description, string typeOfTransaction, string descriptionOption, double deptor, double creditor, double balance,bool sentSms)
{
TdateGr = tdateGr;
TdateFa = tdateFa;
Description = description;
TypeOfTransaction = typeOfTransaction;
DescriptionOption = descriptionOption;
Deptor = deptor;
Creditor = creditor;
Balance = balance;
SentSms = sentSms;
}
public void RemoveBloked()
{
this.SentSms = false;
}
}