temp
This commit is contained in:
parent
769aff3d4f
commit
e814bfd538
@ -1,4 +1,3 @@
|
|||||||
// Global using directives
|
// Global using directives
|
||||||
|
|
||||||
global using Fake.DomainDrivenDesign;
|
global using Fake.DomainDrivenDesign;
|
||||||
global using InterfaceForward.Domain.Enumerations;
|
|
||||||
@ -7,7 +7,7 @@
|
|||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Fake.DomainDrivenDesign" Version="8.0.0-preview.3"/>
|
<PackageReference Include="Fake.DomainDrivenDesign" Version="8.0.0-preview.1"/>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
</Project>
|
</Project>
|
||||||
|
|||||||
@ -0,0 +1,40 @@
|
|||||||
|
using System;
|
||||||
|
using Fake.DomainDrivenDesign.Entities.Auditing;
|
||||||
|
|
||||||
|
namespace InterfaceForward.Domain.ServiceProviderAggregate;
|
||||||
|
|
||||||
|
public class ServiceProviderAggregate(string name, string code, string description, string? flowCode = null)
|
||||||
|
: FullAuditedAggregate<Guid>
|
||||||
|
{
|
||||||
|
///<summary>
|
||||||
|
/// 服务商名称
|
||||||
|
///</summary>
|
||||||
|
public string Name { get; set; } = name;
|
||||||
|
|
||||||
|
///<summary>
|
||||||
|
/// 服务商代码
|
||||||
|
///</summary>
|
||||||
|
public string Code { get; set; } = code;
|
||||||
|
|
||||||
|
///<summary>
|
||||||
|
/// 描述
|
||||||
|
///</summary>
|
||||||
|
public string Description { get; set; } = description;
|
||||||
|
|
||||||
|
///<summary>
|
||||||
|
/// 流程代码
|
||||||
|
///</summary>
|
||||||
|
public string? FlowCode { get; set; } = flowCode;
|
||||||
|
|
||||||
|
///<summary>
|
||||||
|
/// 授权接口Code
|
||||||
|
///</summary>
|
||||||
|
public string? AuthInterfaceCode { get; set; }
|
||||||
|
|
||||||
|
///<summary>
|
||||||
|
/// 请求超时(s)
|
||||||
|
///</summary>
|
||||||
|
public int Timeout { get; set; } = 20;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@ -1,24 +1,28 @@
|
|||||||
using System;
|
using System;
|
||||||
using Fake.DomainDrivenDesign.Entities.Auditing;
|
using Fake.DomainDrivenDesign.Entities.Auditing;
|
||||||
|
using InterfaceForward.Domain.UpStreamInterfaceAggregate;
|
||||||
|
|
||||||
namespace InterfaceForward.Domain.Aggregates.InterfaceAggregate;
|
namespace InterfaceForward.Domain.ServiceProviderAggregate;
|
||||||
|
|
||||||
public class InterfaceEntity: FullAuditedEntity<Guid, Guid>
|
public class ServiceProviderInterfaceEntity : FullAuditedEntity<Guid>
|
||||||
{
|
{
|
||||||
public int ServiceProviderId { get; private set; }
|
public int ServiceProviderId { get; private set; }
|
||||||
|
|
||||||
public string Name { get; private set; }
|
public string Name { get; private set; }
|
||||||
|
|
||||||
public ServiceType ServiceType { get; set; }
|
|
||||||
|
|
||||||
public string Code { get; private set; }
|
public string Code { get; private set; }
|
||||||
|
|
||||||
|
///<summary>
|
||||||
|
/// 描述
|
||||||
|
///</summary>
|
||||||
|
public string Description { get; set; }
|
||||||
|
|
||||||
public string RequestAddress { get; private set; }
|
public string RequestAddress { get; private set; }
|
||||||
|
|
||||||
public string RequestMethod { get; private set; }
|
public string RequestMethod { get; private set; }
|
||||||
|
|
||||||
public RequestContentType RequestContentType { get; private set; }
|
public RequestContentType RequestContentType { get; private set; }
|
||||||
|
|
||||||
public ResponseContentType ResponseContentType { get; private set; }
|
public ResponseContentType ResponseContentType { get; private set; }
|
||||||
|
|
||||||
public string FlowCode { get; private set; }
|
public string FlowCode { get; private set; }
|
||||||
@ -29,11 +33,14 @@ public class InterfaceEntity: FullAuditedEntity<Guid, Guid>
|
|||||||
/// 接口单次请求数量上限,默认是1,表示不支持批量处理
|
/// 接口单次请求数量上限,默认是1,表示不支持批量处理
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public int Limit { get; private set; } = 1;
|
public int Limit { get; private set; } = 1;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 默认0,无限制
|
||||||
|
/// </summary>
|
||||||
public int Qps { get; private set; }
|
public int Qps { get; private set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 映射后的数据类型
|
/// 映射后的数据类型
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public ParameterType MappedType { get; set; } = ParameterType.Object;
|
public ParameterType MappedType { get; set; } = ParameterType.Object;
|
||||||
}
|
}
|
||||||
@ -0,0 +1,42 @@
|
|||||||
|
using System;
|
||||||
|
using Fake.DomainDrivenDesign.Entities.Auditing;
|
||||||
|
|
||||||
|
namespace InterfaceForward.Domain.UpStreamInterfaceAggregate;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 上游接口映射服务商接口(1:N)
|
||||||
|
/// </summary>
|
||||||
|
public class InterfaceMapEntity: CreateAuditedEntity<Guid>, ISoftDelete
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 上游接口代码
|
||||||
|
/// </summary>
|
||||||
|
public string UpStreamInterfaceCode { get; private set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 映射服务商代码
|
||||||
|
/// </summary>
|
||||||
|
public string ServiceProviderCode { get; private set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 映射服务商接口代码
|
||||||
|
/// </summary>
|
||||||
|
public string ServiceProviderInterfaceCode { get; private set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 当前线上版本
|
||||||
|
/// </summary>
|
||||||
|
public string PublishedVersion { get; set; }
|
||||||
|
|
||||||
|
///<summary>
|
||||||
|
/// 前置脚本
|
||||||
|
///</summary>
|
||||||
|
public string PrefixScript { get; set; }
|
||||||
|
|
||||||
|
///<summary>
|
||||||
|
/// 后置脚本
|
||||||
|
///</summary>
|
||||||
|
public string PostfixScript { get; set; }
|
||||||
|
|
||||||
|
public bool IsDeleted { get; }
|
||||||
|
}
|
||||||
@ -1,4 +1,4 @@
|
|||||||
namespace InterfaceForward.Domain.Enumerations;
|
namespace InterfaceForward.Domain.UpStreamInterfaceAggregate;
|
||||||
|
|
||||||
public class ParameterType(int id, string name) : Enumeration(id, name)
|
public class ParameterType(int id, string name) : Enumeration(id, name)
|
||||||
{
|
{
|
||||||
@ -1,4 +1,4 @@
|
|||||||
namespace InterfaceForward.Domain.Enumerations;
|
namespace InterfaceForward.Domain.UpStreamInterfaceAggregate;
|
||||||
|
|
||||||
public class RequestContentType(int id, string name) : Enumeration(id, name)
|
public class RequestContentType(int id, string name) : Enumeration(id, name)
|
||||||
{
|
{
|
||||||
@ -1,4 +1,4 @@
|
|||||||
namespace InterfaceForward.Domain.Enumerations;
|
namespace InterfaceForward.Domain.UpStreamInterfaceAggregate;
|
||||||
|
|
||||||
public class ResponseContentType(int id, string name) : Enumeration(id, name)
|
public class ResponseContentType(int id, string name) : Enumeration(id, name)
|
||||||
{
|
{
|
||||||
@ -1,4 +1,4 @@
|
|||||||
namespace InterfaceForward.Domain.Enumerations;
|
namespace InterfaceForward.Domain.UpStreamInterfaceAggregate;
|
||||||
|
|
||||||
public class ServiceType(int id, string name) : Enumeration(id, name)
|
public class ServiceType(int id, string name) : Enumeration(id, name)
|
||||||
{
|
{
|
||||||
@ -0,0 +1,16 @@
|
|||||||
|
using System;
|
||||||
|
using Fake.DomainDrivenDesign.Entities.Auditing;
|
||||||
|
|
||||||
|
namespace InterfaceForward.Domain.UpStreamInterfaceAggregate;
|
||||||
|
|
||||||
|
public class UpStreamInterfaceAggregate(string name, string code) : FullAuditedAggregate<Guid>
|
||||||
|
{
|
||||||
|
public string Name { get; private set; } = name;
|
||||||
|
|
||||||
|
public string Code { get; private set; } = code;
|
||||||
|
|
||||||
|
///<summary>
|
||||||
|
/// 描述
|
||||||
|
///</summary>
|
||||||
|
public string? Description { get; set; }
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue
Block a user