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 { public int ServiceProviderId { get; private set; } = serviceProviderId; public string Name { get; private set; } = name; public string Code { get; private set; } = code; /// /// 描述 /// 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; /// /// 接口单次请求数量上限,默认是1,表示不支持批量处理 /// public int Limit { get; private set; } = limit; /// /// 接口qps默认0,无限制 /// public int Qps { get; private set; } = qps; /// /// 映射后的数据类型 /// public ParameterType MappedType { get; set; } = mappedType; }