itfx/src/InterfaceForward.Domain/Aggregates/InterfaceAggregate/ServiceProviderInterfaceEntity.cs
2024-03-22 14:08:52 +08:00

61 lines
1.8 KiB
C#
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

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;
}