diff --git a/YD_Event.Core/Entities/WeChatPayConfig.cs b/YD_Event.Core/Entities/WeChatPayConfig.cs
new file mode 100644
index 0000000..0b6b855
--- /dev/null
+++ b/YD_Event.Core/Entities/WeChatPayConfig.cs
@@ -0,0 +1,69 @@
+using YD_Event.Core.Enum;
+
+namespace YD_Event.Core.Entities;
+
+///
+/// 微信支付配置表
+///
+[SugarTable("WeChatPayConfig")]
+public class WeChatPayConfig : Entity, ISoftDelete, ICreatedUserId, ICreatedTime, IUpdatedUserId, IUpdatedTime, IAvailability
+{
+ ///
+ /// 商户ID(外键)
+ ///
+ public long MerchantId { get; set; }
+
+ ///
+ /// 微信支付商户号
+ ///
+ [SugarColumn(Length = 32)]
+ public string MerchantIdValue { get; set; }
+
+ ///
+ /// 微信支付 APIv3 密钥
+ ///
+ [SugarColumn(Length = 64)]
+ public string MerchantV3Secret { get; set; }
+
+ ///
+ /// 微信支付商户证书序列号
+ ///
+ [SugarColumn(Length = 64)]
+ public string MerchantCertificateSerialNumber { get; set; }
+
+ ///
+ /// 微信支付商户私钥(PEM格式)
+ ///
+ [SugarColumn(ColumnDataType = "text")]
+ public string MerchantCertificatePrivateKey { get; set; }
+
+ ///
+ /// 可用状态
+ ///
+ public AvailabilityStatus Status { get; set; }
+
+ ///
+ /// 标记删除
+ ///
+ public bool DeleteMark { get; set; }
+
+ ///
+ /// 创建人
+ ///
+ public long CreatedUserId { get; set; }
+
+ ///
+ /// 创建时间
+ ///
+ public DateTime CreatedTime { get; set; }
+
+ ///
+ /// 更新人
+ ///
+ public long? UpdatedUserId { get; set; }
+
+ ///
+ /// 更新时间
+ ///
+ public DateTime? UpdatedTime { get; set; }
+}
\ No newline at end of file
diff --git a/YD_Event.Core/Infrastructure/WeChat/Dto/WeChatCode2SessionResponse.cs b/YD_Event.Core/Infrastructure/WeChat/Dto/WeChatCode2SessionResponse.cs
new file mode 100644
index 0000000..3f206a6
--- /dev/null
+++ b/YD_Event.Core/Infrastructure/WeChat/Dto/WeChatCode2SessionResponse.cs
@@ -0,0 +1,27 @@
+using Newtonsoft.Json;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace YD_Event.Core.Infrastructure.WeChat.Dto
+{
+ public class WeChatCode2SessionResponse
+ {
+ [JsonProperty("openid")]
+ public string OpenId { get; set; }
+
+ [JsonProperty("session_key")]
+ public string SessionKey { get; set; }
+
+ [JsonProperty("unionid")]
+ public string UnionId { get; set; }
+
+ [JsonProperty("errcode")]
+ public int ErrCode { get; set; }
+
+ [JsonProperty("errmsg")]
+ public string ErrMsg { get; set; }
+ }
+}
diff --git a/YD_Event.Core/Infrastructure/WeChat/WeChatService.cs b/YD_Event.Core/Infrastructure/WeChat/WeChatService.cs
index ee8ba3c..680171e 100644
--- a/YD_Event.Core/Infrastructure/WeChat/WeChatService.cs
+++ b/YD_Event.Core/Infrastructure/WeChat/WeChatService.cs
@@ -9,6 +9,7 @@ using Furion.DependencyInjection;
using System.Net.Http;
using System.Threading.Tasks;
using Furion.FriendlyException;
+using YD_Event.Core.Infrastructure.WeChat.Dto;
namespace YD_Event.Core.Infrastructure.WeChat;
@@ -72,22 +73,4 @@ public class WeChatService : ITransient
throw Oops.Bah("微信服务暂不可用,请稍后重试");
}
}
-}
-
-public class WeChatCode2SessionResponse
-{
- [JsonProperty("openid")]
- public string OpenId { get; set; }
-
- [JsonProperty("session_key")]
- public string SessionKey { get; set; }
-
- [JsonProperty("unionid")]
- public string UnionId { get; set; }
-
- [JsonProperty("errcode")]
- public int ErrCode { get; set; }
-
- [JsonProperty("errmsg")]
- public string ErrMsg { get; set; }
-}
+}
\ No newline at end of file