This commit is contained in:
南浔
2025-07-31 22:52:41 +08:00
73 changed files with 7108 additions and 16 deletions
@@ -0,0 +1,13 @@
using Apimanager_backend.Models;
using System.ComponentModel.DataAnnotations;
namespace Apimanager_backend.Dtos
{
public class CreatePaymentDto
{
public PaymentType PaymentType { get; set; }
[Required]
public decimal Amount { get; set; }
public string ReturnUrl { get; set; }
}
}
+12
View File
@@ -0,0 +1,12 @@
namespace Apimanager_backend.Dtos
{
public class EpayResponse
{
public int code { get; set; }
public string msg { get; set; }
public string trade_no { get; set; }
public string? payurl { get; set; }
public string? qrcode { get; set; }
public string? urlscheme { get; set; }
}
}
+45
View File
@@ -0,0 +1,45 @@
using Apimanager_backend.Models;
using System.ComponentModel.DataAnnotations;
namespace Apimanager_backend.Dtos
{
public class OrderDto
{
/// <summary>
/// 外键,用户ID
/// </summary>
public int UserId { get; set; }
/// <summary>
/// 订单号,唯一
/// </summary>
public string? OrderNumber { get; set; } // varchar(50)
/// <summary>
/// 第三方系统订单编号
/// </summary>
public string? ThirdPartyOrderId { get; set; } // varchar(100)
/// <summary>
/// 订单金额
/// </summary>
public decimal Amount { get; set; } // decimal(10, 2)
//支付方式
public PaymentType PaymentType { get; set; }
/// <summary>
/// 订单类型
/// </summary>
public OrderType OrderType { get; set; } // enum('Recharge','Purchase','Refund')
/// <summary>
/// 订单描述,可选的详细信息
/// </summary>
public string? Description { get; set; } // varchar(255)
public OrderStatus Status { get; set; }
}
}
+11
View File
@@ -0,0 +1,11 @@
namespace Apimanager_backend.Dtos
{
public class PayReturnData
{
public bool Success { get; set; }
public string? OrderNum { get; set; }
public string? PayUrl { get; set; }
public string? QrCode { get; set; }
public string? Urlscheme { get; set; }
}
}
@@ -0,0 +1,8 @@
namespace Apimanager_backend.Dtos
{
public class RateLimiterDto
{
public int UserId { get; set; }
public int RateLimit { get; set; }
}
}
+2 -1
View File
@@ -7,9 +7,10 @@ namespace Apimanager_backend.Dtos
public int Id { get; set; }
public string UserName { get; set; }
public string Email { get; set; }
public List<UserRole> Roles { get; set; }
public List<UserRole>? Roles { get; set; }
public bool IsBan { get; set; }
public decimal Balance { get; set; }
public DateTime Created { get; set; }
public List<UserPackage>? Packages { get; set; }
}
}