Files
using.cash/Logic/Support/LogEntries/PayoutCreatedLogEntry.cs
T
2014-10-08 23:53:12 +02:00

29 lines
997 B
C#

using System;
using Swarmops.Logic.Financial;
using Swarmops.Logic.Structure;
using Swarmops.Logic.Swarm;
namespace Swarmops.Logic.Support.LogEntries
{
[Serializable]
public class PayoutCreatedLogEntry: FinancialActionBase
{
public PayoutCreatedLogEntry()
{
// public ctor required for serializability
}
public PayoutCreatedLogEntry(Person payingPerson, Person beneficiaryPerson, Organization organization, Currency currency, double amount, string reason)
{
this.Amount = amount;
this.Currency = currency.Code;
this.OrganizationId = organization.Identity;
this.DateTime = DateTime.UtcNow;
this.Description = reason;
this.ActingPersonId = payingPerson.Identity; // do not save name for data retention reasons
this.BeneficiaryPersonId = (beneficiaryPerson != null ? beneficiaryPerson.Identity : 0);
}
}
}