新增速率限制,调整本地文件上传,服务监控IP取本机网络IP,仓储增加方法
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
namespace ZR.ServiceCore.Model;
|
||||
|
||||
[SugarTable("ip_rate_limit_log")]
|
||||
[Tenant("0")]
|
||||
public class IpRateLimitLog
|
||||
{
|
||||
[SugarColumn(IsPrimaryKey = true)]
|
||||
[JsonConverter(typeof(ValueToStringConverter))]
|
||||
public long Id { get; set;}
|
||||
|
||||
public string HttpVerb { get; set; }
|
||||
|
||||
public string Path { get; set; }
|
||||
|
||||
public string ClientIp { get; set; }
|
||||
|
||||
public double Limit { get; set; }
|
||||
|
||||
public string Period { get; set; }
|
||||
|
||||
public double Exceeded { get; set; }
|
||||
|
||||
public string Endpoint { get; set; }
|
||||
|
||||
public DateTime CreateTime { get; set; }
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
namespace ZR.ServiceCore.Model;
|
||||
|
||||
[SugarTable("ip_rate_limit_policy")]
|
||||
[Tenant("0")]
|
||||
public class IpRateLimitPolicy
|
||||
{
|
||||
[SugarColumn(IsPrimaryKey = true)]
|
||||
[JsonConverter(typeof(ValueToStringConverter))]
|
||||
public long Id { get; set; }
|
||||
|
||||
public string Ip { get; set; }
|
||||
|
||||
[Navigate(NavigateType.OneToMany, nameof(RateLimitRule.IpRateLimitPolicyId))]
|
||||
public List<RateLimitRule> Rules { get; set; }
|
||||
|
||||
public char Flag { get; set; } = '0';
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
namespace ZR.ServiceCore.Model;
|
||||
|
||||
[SugarTable("rate_limit_rule")]
|
||||
[Tenant("0")]
|
||||
public class RateLimitRule
|
||||
{
|
||||
[SugarColumn(IsPrimaryKey = true)]
|
||||
[JsonConverter(typeof(ValueToStringConverter))]
|
||||
public long Id { get; set; }
|
||||
|
||||
[JsonConverter(typeof(ValueToStringConverter))]
|
||||
public long IpRateLimitPolicyId { get; set; }
|
||||
|
||||
public string Endpoint { get; set; }
|
||||
|
||||
public string Period { get; set; }
|
||||
|
||||
public double Limit { get; set; }
|
||||
|
||||
public char Flag { get; set; } = '0';
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
namespace ZR.ServiceCore.Model;
|
||||
|
||||
[SugarTable("sys_login_limit")]
|
||||
[Tenant("0")]
|
||||
public class SysLoginLimit
|
||||
{
|
||||
[SugarColumn(IsPrimaryKey = true)]
|
||||
[JsonConverter(typeof(ValueToStringConverter))]
|
||||
public long Id { get; set; }
|
||||
|
||||
public string UserName { get; set; }
|
||||
|
||||
public int? ErrorCount { get; set; }
|
||||
|
||||
public DateTime? ErrorTime { get; set; }
|
||||
|
||||
public string Ip { get; set; }
|
||||
|
||||
public char Flag { get; set; }
|
||||
}
|
||||
Reference in New Issue
Block a user