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
{
///
/// Repräsentiert eine Wallet eines App-Users
///
public class Wallet : SyncEntity
{
///
/// Id des App-Users
///
[Required]
[MaxLength(128)]
public string AppUserId { get; set; }
///
/// Id des Wallets bei MangoPay
///
[Required]
[MaxLength(255)]
public string WalletId { get; set; }
///
/// Typ des Wallets
///
[Required]
public WalletType Type { get; set; }
///
/// Id des Payment-Users bei MangoPay
///
[Required]
[MaxLength(255)]
public string OwnerId { get; set; }
///
/// Währung ISO 4217 Code
///
[Required]
[MaxLength(3)]
public string Currency { get; set; }
///
/// Kontostand des Wallets in der kleinsten Einheit der Währung
/// Beispiel: 12.60 EUR werden als 1260 übertragen
///
[Required]
public long Balance { get; set; }
///
/// Beschreibung des Wallets
///
[MaxLength(255)]
public string Description { get; set; }
///
/// Betrag in Euro
///
public decimal BalanceInEuro => Balance / 100m;
}
}