itfx/src/InterfaceForward.Api.Contract/Models/ForwardCoreContextCache.cs
2024-03-22 14:08:52 +08:00

95 lines
2.5 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.Collections.Generic;
using InterfaceForward.Api.Contract.Enums;
using InterfaceForward.Domain.Enums;
namespace InterfaceForward.Api.Contract.Models;
public class ForwardCoreContextCache
{
/// <summary>
/// 业务接口
/// </summary>
public InterfaceDto OriginalInterface { get; set; } = null!;
/// <summary>
/// 目标服务商
/// </summary>
public ServiceProviderDto TargetServiceProvider { get; set; } = null!;
/// <summary>
/// 目标服务商接口集合
/// </summary>
public List<TargetInterfaceSummary> TargetInterfaces { get; set; } = new();
/// <summary>
/// 出参映射列表(树形结构)
/// </summary>
public List<ParameterNode> OutParamTreeList { get; set; } = null!;
/// <summary>
/// 目标服务商授权接口
/// </summary>
public TargetInterfaceSummary ServiceProviderAuthInterface { get; set; } = null!;
/// <summary>
/// 目标服务商授权配置
/// </summary>
public List<ServiceProviderAuthConfigDto> ServiceProviderAuthConfigs { get; set; } = null!;
}
public class ServiceProviderAuthConfigDto
{
///<summary>
/// 参数标识1入参2授权令牌3有效时间4固定有效时间5脚本
///</summary>
public AuthParameterFlag Flag { get; set; }
///<summary>
/// 参数路径
///</summary>
public string ParameterAlias { get; set; } = null!;
public string? Value1 { get; set; }
public string? Value2 { get; set; }
public string? Value3 { get; set; }
}
public class TargetInterfaceSummary
{
/// <summary>
/// 目标服务商接口
/// </summary>
public InterfaceDto TargetInterface { get; set; } = null!;
/// <summary>
/// 请求前置脚本
/// </summary>
public string? PrefixScript { get; set; }
/// <summary>
/// 请求后置脚本
/// </summary>
public string? PostfixScript { get; set; }
/// <summary>
/// 入参映射列表(树形结构)
/// </summary>
public List<ParameterNode> InParamTreeList { get; set; } = null!;
/// <summary>
/// 固定值列表
/// </summary>
public List<FixedFieldWithValueDto> FixedFieldList { get; set; } = null!;
/// <summary>
/// 返回配置列表
/// </summary>
public List<InterfaceReturnConfigDto> ReturnConfigList { get; set; } = null!;
/// <summary>
/// 表单字段列表
/// </summary>
public List<InterfaceFormFieldDto> FormFieldList { get; set; } = null!;
}