forked from xiongyuxing/tiku-backend.net
49 lines
1.0 KiB
C#
49 lines
1.0 KiB
C#
using System.ComponentModel.DataAnnotations;
|
|
using Tiku.Application.Points;
|
|
|
|
namespace Tiku.Api.Contracts;
|
|
|
|
public sealed class PointQueryDto
|
|
{
|
|
[Range(1, 200)]
|
|
public int? Limit { get; set; }
|
|
|
|
[StringLength(32)]
|
|
public string? Status { get; set; }
|
|
|
|
public Guid? RegionId { get; set; }
|
|
|
|
public PointLimitQuery ToQuery()
|
|
{
|
|
return new PointLimitQuery(Limit, Status, RegionId);
|
|
}
|
|
}
|
|
|
|
public sealed class ClaimPointTaskDto
|
|
{
|
|
[Required]
|
|
[StringLength(100)]
|
|
public string TaskKey { get; set; } = string.Empty;
|
|
|
|
[StringLength(100)]
|
|
public string? SourceType { get; set; }
|
|
|
|
public Guid? SourceId { get; set; }
|
|
|
|
public ClaimPointTaskCommand ToCommand()
|
|
{
|
|
return new ClaimPointTaskCommand(TaskKey, SourceType, SourceId);
|
|
}
|
|
}
|
|
|
|
public sealed class CreatePointExchangeOrderDto
|
|
{
|
|
[Required]
|
|
public Guid ItemId { get; set; }
|
|
|
|
public CreatePointExchangeOrderCommand ToCommand()
|
|
{
|
|
return new CreatePointExchangeOrderCommand(ItemId);
|
|
}
|
|
}
|