From c8b6903d85e7ceef504a198b4bdfc6b72a73fe19 Mon Sep 17 00:00:00 2001
From: sunpengfei <i@angelzzz.com>
Date: 星期五, 08 八月 2025 13:29:47 +0800
Subject: [PATCH] fix:bug

---
 FlexJobApi.Core/Entities/Common/Resource.cs |   25 +++++++++++++++++++++----
 1 files changed, 21 insertions(+), 4 deletions(-)

diff --git a/FlexJobApi.Core/Entities/Common/Resource.cs b/FlexJobApi.Core/Entities/Common/Resource.cs
index 8e4354c..e5d201a 100644
--- a/FlexJobApi.Core/Entities/Common/Resource.cs
+++ b/FlexJobApi.Core/Entities/Common/Resource.cs
@@ -1,7 +1,9 @@
-锘縰sing System;
+锘縰sing Furion.FriendlyException;
+using System;
 using System.Collections.Generic;
 using System.ComponentModel.DataAnnotations;
 using System.Linq;
+using System.Net.Http;
 using System.Text;
 using System.Threading.Tasks;
 
@@ -10,7 +12,7 @@
     /// <summary>
     /// 璧勬簮
     /// </summary>
-    public class Resource : CommonEntity, IDbAuditLogIgnore
+    public class Resource : CommonEntity, IDbAuditLogIgnore, IPhysicalDeletion
     {
         /// <summary>
         /// 搴旂敤鍚嶇О
@@ -100,18 +102,33 @@
         /// <summary>
         /// 鍝嶅簲绫诲瀷鍚嶇О
         /// </summary>
-        [Required]
         public string ResponseTypeName { get; set; }
 
         /// <summary>
         /// 鍝嶅簲绫诲瀷鍏ㄥ悕
         /// </summary>
-        [Required]
         public string ResponseTypeFullName { get; set; }
 
         /// <summary>
         /// 鏄惁宸茶繃鏈�
         /// </summary>
         public bool IsExpired { get; set; }
+
+        public HttpMethod GetHttpMethod()
+        {
+            switch (Method)
+            {
+                case EnumResourceMethod.Get:
+                    return HttpMethod.Get;
+                case EnumResourceMethod.Post:
+                    return HttpMethod.Post;
+                case EnumResourceMethod.Put:
+                    return HttpMethod.Put;
+                case EnumResourceMethod.Delete:
+                    return HttpMethod.Delete;
+                default:
+                    throw Oops.Oh(EnumErrorCodeType.s400, "涓嶆敮鎸佺殑璇锋眰绫诲瀷");
+            }
+        }
     }
 }

--
Gitblit v1.9.1