This commit is contained in:
Tizian.Breuch
2025-07-29 19:11:34 +02:00
parent 3907cba29d
commit 6fc6aaef3e
14 changed files with 375 additions and 31 deletions

View File

@@ -1,5 +1,7 @@
using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Webshop.Domain.Enums;
namespace Webshop.Domain.Entities;
@@ -8,22 +10,21 @@ namespace Webshop.Domain.Entities;
/// </summary>
public class PaymentMethod
{
[Key]
public Guid Id { get; set; }
public Guid Id { get; set; } = Guid.NewGuid();
[Required]
[MaxLength(100)]
public string Name { get; set; }
public string Name { get; set; } = string.Empty;
[MaxLength(500)]
public string? Description { get; set; }
[Required]
public bool IsActive { get; set; }
public bool IsActive { get; set; } = true;
[Required]
[MaxLength(50)]
public string PaymentGatewayType { get; set; } // "Stripe", "PayPal", etc.
public PaymentGatewayType PaymentGatewayType { get; set; }
[Column(TypeName = "jsonb")]
public string? Configuration { get; set; }
public decimal? ProcessingFee { get; set; }
}