61 lines
1.8 KiB
C#
61 lines
1.8 KiB
C#
using System;
|
||
using Fake.DomainDrivenDesign.Entities.Auditing;
|
||
using InterfaceForward.Domain.Enums;
|
||
using InterfaceForward.Domain.InterfaceAggregate;
|
||
|
||
namespace InterfaceForward.Domain.Aggregates.InterfaceAggregate;
|
||
|
||
public class ServiceProviderInterfaceEntity(
|
||
int serviceProviderId,
|
||
string name,
|
||
string code,
|
||
string description,
|
||
string requestAddress,
|
||
string requestMethod,
|
||
RequestContentType requestContentType,
|
||
ResponseContentType responseContentType,
|
||
string? flowCode,
|
||
int timeout = 20,
|
||
int limit = 1,
|
||
int qps = 0,
|
||
ParameterType mappedType = ParameterType.Object)
|
||
: FullAuditedEntity<Guid>
|
||
{
|
||
public int ServiceProviderId { get; private set; } = serviceProviderId;
|
||
|
||
public string Name { get; private set; } = name;
|
||
|
||
public string Code { get; private set; } = code;
|
||
|
||
///<summary>
|
||
/// 描述
|
||
///</summary>
|
||
public string Description { get; set; } = description;
|
||
|
||
public string RequestAddress { get; private set; } = requestAddress;
|
||
|
||
public string RequestMethod { get; private set; } = requestMethod;
|
||
|
||
public RequestContentType RequestContentType { get; private set; } = requestContentType;
|
||
|
||
public ResponseContentType ResponseContentType { get; private set; } = responseContentType;
|
||
|
||
public string? FlowCode { get; private set; } = flowCode;
|
||
|
||
public int Timeout { get; private set; } = timeout;
|
||
|
||
/// <summary>
|
||
/// 接口单次请求数量上限,默认是1,表示不支持批量处理
|
||
/// </summary>
|
||
public int Limit { get; private set; } = limit;
|
||
|
||
/// <summary>
|
||
/// 接口qps默认0,无限制
|
||
/// </summary>
|
||
public int Qps { get; private set; } = qps;
|
||
|
||
/// <summary>
|
||
/// 映射后的数据类型
|
||
/// </summary>
|
||
public ParameterType MappedType { get; set; } = mappedType;
|
||
} |