19 lines
506 B
C#
19 lines
506 B
C#
using LiteCharms.Features.Shop.CartPackages.Models;
|
|
|
|
namespace LiteCharms.Features.CartPackages.Queries;
|
|
|
|
public class GetPackageQuery : IRequest<Result<Package>>
|
|
{
|
|
public Guid PackageId { get; set; }
|
|
|
|
private GetPackageQuery(Guid packageId) => PackageId = packageId;
|
|
|
|
public static GetPackageQuery Create(Guid packageId)
|
|
{
|
|
if(packageId == Guid.Empty)
|
|
throw new ArgumentException("Package ID is required", nameof(packageId));
|
|
|
|
return new(packageId);
|
|
}
|
|
}
|