24 lines
632 B
C#
24 lines
632 B
C#
namespace LiteCharms.Features.CartPackages.Commands;
|
|
|
|
public class CreatePackageCommand : IRequest<Result<Guid>>
|
|
{
|
|
public string? Name { get; set; }
|
|
|
|
public string? Description { get; set; }
|
|
|
|
private CreatePackageCommand(string? name, string? description)
|
|
{
|
|
Name = name;
|
|
Description = description;
|
|
}
|
|
|
|
public static CreatePackageCommand Create(string? name, string? description)
|
|
{
|
|
ArgumentException.ThrowIfNullOrWhiteSpace(name, nameof(name));
|
|
|
|
ArgumentException.ThrowIfNullOrWhiteSpace(description, nameof(description));
|
|
|
|
return new(name, description);
|
|
}
|
|
}
|