103 lines
2.7 KiB
C#
103 lines
2.7 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.ComponentModel.DataAnnotations;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
using gehGassi.Domain.Common;
|
|
|
|
namespace gehGassi.Domain.Shop
|
|
{
|
|
/// <summary>
|
|
/// Repräsentiert die Einstellungen für den Shop
|
|
/// </summary>
|
|
public class ShopSettings : IAuditable
|
|
{
|
|
[Key]
|
|
[Required]
|
|
public int Id { get; set; }
|
|
|
|
/// <summary>
|
|
/// E-Mail Adresse für die Shop-Bestellungen
|
|
/// </summary>
|
|
[Required]
|
|
[MaxLength(255)]
|
|
public string OrderEmail { get; set; }
|
|
|
|
/// <summary>
|
|
/// Zahlen auf Rechnung allgemein möglich?
|
|
/// </summary>
|
|
[Required]
|
|
public bool PaymentOnInvoice { get; set; }
|
|
|
|
/// <summary>
|
|
/// Zahlen mittels PayPal möglich?
|
|
/// </summary>
|
|
[Required]
|
|
public bool PayPalEnabled { get; set; }
|
|
|
|
/// <summary>
|
|
/// PayPal ClientId für Token
|
|
/// </summary>
|
|
[MaxLength(200)]
|
|
public string PayPalClientId { get; set; }
|
|
|
|
/// <summary>
|
|
/// PayPal Secret für Token
|
|
/// </summary>
|
|
[MaxLength(200)]
|
|
public string PayPalSecret { get; set; }
|
|
|
|
/// <summary>
|
|
/// Klarna aktiviert
|
|
/// </summary>
|
|
[Required]
|
|
public bool KlarnaEnabled { get; set; }
|
|
|
|
/// <summary>
|
|
/// Klarna ClientId für Token
|
|
/// </summary>
|
|
[MaxLength(200)]
|
|
public string KlarnaClientId { get; set; }
|
|
|
|
/// <summary>
|
|
/// Klarna Secret für Token
|
|
/// </summary>
|
|
[MaxLength(200)]
|
|
public string KlarnaSecret { get; set; }
|
|
|
|
/// <summary>
|
|
/// Einstellung für die Berechnungsmethode der Versandkosten
|
|
/// </summary>
|
|
[Required]
|
|
public ShipmentCalculationType ShipmentCalculationType { get; set; }
|
|
|
|
#region IAuditable
|
|
/// <summary>
|
|
/// Gibt den eindeutigen Key für die Entität zurück;
|
|
/// Hier als String gelöst, weil damit auch kombinierte Schlüssel möglich sind.
|
|
/// </summary>
|
|
/// <returns>Eindeutiger Key</returns>
|
|
public string AuditKey()
|
|
{
|
|
return Id.ToString();
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gibt den Objektnamen bzw. die Tabelle der Entität zurück
|
|
/// </summary>
|
|
/// <returns>Objektnamen</returns>
|
|
public string AuditTable()
|
|
{
|
|
return "ShopSettingss";
|
|
}
|
|
|
|
public AuditableOptions Options()
|
|
{
|
|
return AuditableOptions.Create | AuditableOptions.Edit | AuditableOptions.Delete;
|
|
}
|
|
|
|
#endregion
|
|
}
|
|
}
|