70 lines
1.7 KiB
C#

using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using gehGassiApp.Domain.Base;
using gehGassiApp.Domain.Common;
namespace gehGassiApp.Domain.Payment
{
/// <summary>
/// Repräsentiert eine Wallet eines App-Users
/// </summary>
public class Wallet : SyncEntity
{
/// <summary>
/// Id des App-Users
/// </summary>
[Required]
[MaxLength(128)]
public string AppUserId { get; set; }
/// <summary>
/// Id des Wallets bei MangoPay
/// </summary>
[Required]
[MaxLength(255)]
public string WalletId { get; set; }
/// <summary>
/// Typ des Wallets
/// </summary>
[Required]
public WalletType Type { get; set; }
/// <summary>
/// Id des Payment-Users bei MangoPay
/// </summary>
[Required]
[MaxLength(255)]
public string OwnerId { get; set; }
/// <summary>
/// Währung ISO 4217 Code
/// </summary>
[Required]
[MaxLength(3)]
public string Currency { get; set; }
/// <summary>
/// Kontostand des Wallets in der kleinsten Einheit der Währung
/// Beispiel: 12.60 EUR werden als 1260 übertragen
/// </summary>
[Required]
public long Balance { get; set; }
/// <summary>
/// Beschreibung des Wallets
/// </summary>
[MaxLength(255)]
public string Description { get; set; }
/// <summary>
/// Betrag in Euro
/// </summary>
public decimal BalanceInEuro => Balance / 100m;
}
}