53 lines
2.0 KiB
C#
53 lines
2.0 KiB
C#
using _0_Framework.Domain;
|
|
using CompanyManagment.App.Contracts.PaymentInstrument;
|
|
|
|
namespace Company.Domain.PaymentInstrumentAgg;
|
|
|
|
public class PaymentInstrument:EntityBase
|
|
{
|
|
private PaymentInstrument(string cardNumber, string accountHolderName, string accountNumber,string iBan,bool isAuth,long paymentInstrumentGroupId)
|
|
{
|
|
CardNumber = cardNumber;
|
|
AccountHolderName = accountHolderName;
|
|
AccountNumber = accountNumber;
|
|
IBan = iBan;
|
|
IsAuth = isAuth;
|
|
PaymentInstrumentGroupId = paymentInstrumentGroupId;
|
|
Type = PaymentInstrumentType.BankAccount;
|
|
}
|
|
|
|
private PaymentInstrument(string posTerminalId , string description,long paymentInstrumentGroupId)
|
|
{
|
|
PosTerminalId = posTerminalId;
|
|
Description = description;
|
|
PaymentInstrumentGroupId = paymentInstrumentGroupId;
|
|
Type = PaymentInstrumentType.BankAccount;
|
|
}
|
|
|
|
public static PaymentInstrument CreatePosType(string posTerminalId, string description, long paymentInstrumentGroupId)
|
|
{
|
|
return new PaymentInstrument(posTerminalId, description, paymentInstrumentGroupId);
|
|
}
|
|
|
|
public static PaymentInstrument CreateBankAccount(string cardNumber, string accountHolderName, string accountNumber,
|
|
string iBan, bool isAuth, long paymentInstrumentGroupId)
|
|
{
|
|
return new PaymentInstrument(cardNumber, accountHolderName, accountNumber, iBan, isAuth, paymentInstrumentGroupId);
|
|
}
|
|
|
|
public string CardNumber { get; private set; }
|
|
public string AccountHolderName { get; private set; }
|
|
public string AccountNumber { get; private set; }
|
|
public string IBan { get; private set; }
|
|
|
|
public string PosTerminalId { get; private set; }
|
|
public string Description { get; set; }
|
|
|
|
public PaymentInstrumentType Type { get; private set; }
|
|
|
|
public bool IsAuth { get; private set; }
|
|
|
|
public long PaymentInstrumentGroupId { get; private set; }
|
|
public PaymentInstrumentGroup PaymentInstrumentGroup { get; private set; }
|
|
}
|