shipping method weight
This commit is contained in:
@@ -1,38 +1,46 @@
|
||||
using System;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace Webshop.Domain.Entities;
|
||||
|
||||
/// <summary>
|
||||
/// Konfigurierbare Versandoptionen für den Checkout.
|
||||
/// </summary>
|
||||
public class ShippingMethod
|
||||
namespace Webshop.Domain.Entities
|
||||
{
|
||||
[Key]
|
||||
public Guid Id { get; set; }
|
||||
/// <summary>
|
||||
/// Konfigurierbare Versandoptionen für den Checkout.
|
||||
/// </summary>
|
||||
public class ShippingMethod
|
||||
{
|
||||
[Key]
|
||||
public Guid Id { get; set; }
|
||||
|
||||
[Required]
|
||||
[MaxLength(100)]
|
||||
public string Name { get; set; }
|
||||
[Required]
|
||||
[MaxLength(100)]
|
||||
public string Name { get; set; } = string.Empty;
|
||||
|
||||
[MaxLength(500)]
|
||||
public string? Description { get; set; }
|
||||
[MaxLength(500)]
|
||||
public string? Description { get; set; }
|
||||
|
||||
// Precision wird via Fluent API konfiguriert
|
||||
[Required]
|
||||
public decimal BaseCost { get; set; }
|
||||
// Grundkosten der Versandmethode
|
||||
[Required]
|
||||
public decimal BaseCost { get; set; }
|
||||
|
||||
public decimal? MinimumOrderAmount { get; set; }
|
||||
// Optional: Mindestbestellwert (für kostenlosen Versand etc.)
|
||||
public decimal? MinimumOrderAmount { get; set; }
|
||||
|
||||
[Required]
|
||||
public bool IsActive { get; set; }
|
||||
[Required]
|
||||
public bool IsActive { get; set; }
|
||||
|
||||
[MaxLength(100)]
|
||||
public string? EstimatedDeliveryTime { get; set; }
|
||||
[MaxLength(100)]
|
||||
public string? EstimatedDeliveryTime { get; set; }
|
||||
|
||||
[Required]
|
||||
public bool RequiresTracking { get; set; }
|
||||
[Required]
|
||||
public bool RequiresTracking { get; set; }
|
||||
|
||||
public int MinDeliveryDays { get; set; }
|
||||
public int MaxDeliveryDays { get; set; }
|
||||
public int MinDeliveryDays { get; set; }
|
||||
public int MaxDeliveryDays { get; set; }
|
||||
|
||||
// NEU: Gewichtsbasierte Berechnung
|
||||
// Einheit: kg (oder die Standardeinheit deines Shops)
|
||||
public decimal MinWeight { get; set; } = 0;
|
||||
|
||||
public decimal MaxWeight { get; set; } = 0;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user