RequestData.cs 1.15 KB
using System;
using System.Collections.Generic;
using System.Text;

namespace Hh.Mes.POJO.Request
{
    /// <summary>
    /// api 统一接受实体 主子结构  T2 默认 是list
    /// </summary>
    /// <typeparam name="T1"></typeparam>
    /// <typeparam name="T2"></typeparam>
    public class RequestData<T1, T2>
    {
        /// <summary>
        /// 
        /// </summary>
        public Data<T1, T2> Data { get; set; }
    }


    public class Data<T1, T2>
    {
        /// <summary>
        /// 主体
        /// </summary>
        public T1 Header { get; set; }

        /// <summary>
        /// 明细
        /// </summary>
        public List<T2> Details { get; set; }
    }


    /// <summary>
    /// api 统一接受实体 单结构  
    /// </summary>
    /// <typeparam name="T1"></typeparam>
    public class RequestData<T1>
    {
        /// <summary>
        /// 
        /// </summary>
        public T1 Data { get; set; }
    }

    public class RequestDataEx<T>
    {
        public int version { get; set; }
        public string taskId { get; set; }
        public string taskType { get; set; }
        public T task { get; set; }
    }


}