feat: 支付完成后自动为用户充值VIP并支持按商品类型计算有效期

This commit is contained in:
ccnetcore
2025-08-13 22:19:31 +08:00
parent 3a60bcc174
commit 40c0a5ac64
8 changed files with 98 additions and 24 deletions

View File

@@ -1,3 +1,4 @@
using System.ComponentModel.DataAnnotations;
using Yi.Framework.AiHub.Domain.Shared.Enums;
namespace Yi.Framework.AiHub.Application.Contracts.Dtos.Pay;
@@ -10,5 +11,6 @@ public class CreateOrderInput
/// <summary>
/// 商品类型
/// </summary>
[Required]
public GoodsTypeEnum GoodsType { get; set; }
}

View File

@@ -25,9 +25,10 @@ public class RechargeCreateInput
public string Content { get; set; } = string.Empty;
/// <summary>
/// 到期时间为空表示永久VIP
/// VIP月数(为空或0表示永久VIP
/// </summary>
public DateTime? ExpireDateTime { get; set; }
[Range(0, int.MaxValue, ErrorMessage = "月数必须大于等于0")]
public int? Months { get; set; }
/// <summary>
/// 备注