Browse Source

Add properties `FromTime` and `ToTime` to ProductAsset and ProductAssetCategory

pull/157/head
gdlcf88 4 years ago
parent
commit
713b00da28
  1. 12
      plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Domain/EasyAbp/EShop/Plugins/Booking/ProductAssetCategories/ProductAssetCategory.cs
  2. 12
      plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Domain/EasyAbp/EShop/Plugins/Booking/ProductAssets/ProductAsset.cs

12
plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Domain/EasyAbp/EShop/Plugins/Booking/ProductAssetCategories/ProductAssetCategory.cs

@ -7,6 +7,7 @@ namespace EasyAbp.EShop.Plugins.Booking.ProductAssetCategories;
/// <summary>
/// Mapping of ProductSku to AssetCategory.
/// Set which SKU can use to book a specified asset category.
/// The matched <see cref="ProductAssetCategory"/> with the larger <see cref="FromTime"/> takes precedence.
/// </summary>
public class ProductAssetCategory : AuditedAggregateRoot<Guid>, IMultiTenant
{
@ -18,6 +19,17 @@ public class ProductAssetCategory : AuditedAggregateRoot<Guid>, IMultiTenant
public virtual Guid AssetCategoryId { get; protected set; }
/// <summary>
/// When will this mapping start taking effect.
/// </summary>
public virtual DateTime FromTime { get; protected set; }
/// <summary>
/// When will this mapping stop taking effect.
/// Setting to <c>null</c> means until forever.
/// </summary>
public virtual DateTime? ToTime { get; protected set; }
/// <summary>
/// Fall back to the price of ProductSku if <c>null</c>.
/// </summary>

12
plugins/Booking/src/EasyAbp.EShop.Plugins.Booking.Domain/EasyAbp/EShop/Plugins/Booking/ProductAssets/ProductAsset.cs

@ -7,6 +7,7 @@ namespace EasyAbp.EShop.Plugins.Booking.ProductAssets;
/// <summary>
/// Mapping of ProductSku to Asset.
/// Set which SKU can use to book a specified asset.
/// The matched <see cref="ProductAsset"/> with the larger <see cref="FromTime"/> takes precedence.
/// </summary>
public class ProductAsset : AuditedAggregateRoot<Guid>, IMultiTenant
{
@ -18,6 +19,17 @@ public class ProductAsset : AuditedAggregateRoot<Guid>, IMultiTenant
public virtual Guid AssetId { get; protected set; }
/// <summary>
/// When will this mapping start taking effect.
/// </summary>
public virtual DateTime FromTime { get; protected set; }
/// <summary>
/// When will this mapping stop taking effect.
/// Setting to <c>null</c> means until forever.
/// </summary>
public virtual DateTime? ToTime { get; protected set; }
/// <summary>
/// Fall back to the price of ProductSku if <c>null</c>.
/// </summary>

Loading…
Cancel
Save