84 lines
3.4 KiB
C#
84 lines
3.4 KiB
C#
using System.ComponentModel.DataAnnotations;
|
|
using gehGassi.Web.Helper;
|
|
|
|
namespace gehGassi.Web.Models
|
|
{
|
|
/// <summary>
|
|
/// Viewmodel für die Shop-Einstellungen
|
|
/// </summary>
|
|
public class ShopSettingsVm
|
|
{
|
|
[Required(ErrorMessage = "Err_Required")]
|
|
public int Id { get; set; }
|
|
|
|
/// <summary>
|
|
/// E-Mail Adresse für die Shop-Bestellungen
|
|
/// </summary>
|
|
[Required(ErrorMessage = "Err_Required")]
|
|
[EmailAddress(ErrorMessage = "Err_InvalidEmail")]
|
|
[MaxLength(255, ErrorMessage = "Err_StringLength_Max")]
|
|
[Display(Name = "ShopSettings_OrderEmail")]
|
|
public string OrderEmail { get; set; }
|
|
|
|
/// <summary>
|
|
/// Zahlen auf Rechnung allgemein möglich?
|
|
/// </summary>
|
|
[Required(ErrorMessage = "Err_Required")]
|
|
[Display(Name = "ShopSettings_PaymentOnInvoice", Description = "ShopSettings_PaymentOnInvoice_Desc")]
|
|
public bool PaymentOnInvoice { get; set; }
|
|
|
|
/// <summary>
|
|
/// Zahlen mittels PayPal möglich?
|
|
/// </summary>
|
|
[Required(ErrorMessage = "Err_Required")]
|
|
[Display(Name = "ShopSettings_PayPalEnabled", Description = "ShopSettings_PayPalEnabled_Desc")]
|
|
public bool PayPalEnabled { get; set; }
|
|
|
|
/// <summary>
|
|
/// PayPal ClientId für Token
|
|
/// </summary>
|
|
[RequiredIf("PayPalEnabled", true, ErrorMessage = "Err_Required")]
|
|
[MaxLength(200, ErrorMessage = "Err_StringLength_Max")]
|
|
[Display(Name = "ShopSettings_PayPalClientId", Description = "ShopSettings_PayPalClientId_Desc")]
|
|
public string PayPalClientId { get; set; }
|
|
|
|
/// <summary>
|
|
/// PayPal Secret für Token
|
|
/// </summary>
|
|
[RequiredIf("PayPalEnabled", true, ErrorMessage = "Err_Required")]
|
|
[MaxLength(200, ErrorMessage = "Err_StringLength_Max")]
|
|
[Display(Name = "ShopSettings_PayPalSecret", Description = "ShopSettings_PayPalSecret_Desc")]
|
|
public string PayPalSecret { get; set; }
|
|
|
|
/// <summary>
|
|
/// Klarna aktiviert
|
|
/// </summary>
|
|
[Required(ErrorMessage = "Err_Required")]
|
|
[Display(Name = "ShopSettings_KlarnaEnabled", Description = "ShopSettings_KlarnaEnabled_Desc")]
|
|
public bool KlarnaEnabled { get; set; }
|
|
|
|
/// <summary>
|
|
/// Klarna ClientId für Token
|
|
/// </summary>
|
|
[RequiredIf("KlarnaEnabled", true, ErrorMessage = "Err_Required")]
|
|
[MaxLength(200, ErrorMessage = "Err_StringLength_Max")]
|
|
[Display(Name = "ShopSettings_KlarnaClientId", Description = "ShopSettings_KlarnaClientId_Desc")]
|
|
public string KlarnaClientId { get; set; }
|
|
|
|
/// <summary>
|
|
/// Klarna Secret für Token
|
|
/// </summary>
|
|
[RequiredIf("KlarnaEnabled", true, ErrorMessage = "Err_Required")]
|
|
[MaxLength(200, ErrorMessage = "Err_StringLength_Max")]
|
|
[Display(Name = "ShopSettings_KlarnaSecret", Description = "ShopSettings_KlarnaSecret_Desc")]
|
|
public string KlarnaSecret { get; set; }
|
|
|
|
/// <summary>
|
|
/// Einstellung für die Berechnungsmethode der Versandkosten
|
|
/// </summary>
|
|
[Required(ErrorMessage = "Err_Required")]
|
|
[Display(Name = "ShopSettings_ShipmentCalculationType", Description = "ShopSettings_ShipmentCalculationType_Desc")]
|
|
public ShipmentCalculationTypeVm ShipmentCalculationType { get; set; }
|
|
}
|
|
}
|