using System.Collections.Generic;
using GxPress.Entity.WorkFlow;
using GxPress.EnumConst;

namespace GxPress.Api.AppControllers
{
    public partial class AppFlowController
    {
        public class TodoListResult
        {
            /// <summary>
            /// 当前页
            /// </summary>
            public int Count { get; set; }

            /// <summary>
            /// 每页显示多少项
            /// </summary>
            public IEnumerable<FlowTodoResult> Items { get; set; }
        }

        public class GetCountResult
        {
            /// <summary>
            /// 我审批的 - 待审批
            /// </summary>
            public int MyCheckingCount { get; set; }

            /// <summary>
            /// 我审批的 - 已审批
            /// </summary>
            public int MyCheckedCount { get; set; }

            /// <summary>
            /// 我发起的 - 待审批
            /// </summary>
            public int SubmittedCheckingCount { get; set; }

            /// <summary>
            /// 我发起的 - 已审批
            /// </summary>
            public int SubmittedCheckedCount { get; set; }

            /// <summary>
            /// 抄送我的 - 未读
            /// </summary>
            public int CcUnreadCount { get; set; }

            /// <summary>
            /// 抄送我的 - 全部
            /// </summary>
            public int CcAllCount { get; set; }
        }

        public class FlowTodoResult : FlowTodo
        {
            public FlowState State { get; set; }
            /// <summary>
            /// 当前页
            /// </summary>
            public string Title { get; set; }

            public string AvatarUrl { get; set; }

            /// <summary>
            /// 每页显示多少项
            /// </summary>
            public List<string> Summaries { get; set; }
        }

        public class CheckRequest
        {
            /// <summary>
            /// 工作流Id
            /// </summary>
            public int FlowId { get; set; }

            /// <summary>
            /// 待办Id
            /// </summary>
            public int TodoId { get; set; }

            /// <summary>
            /// 是否审核通过
            /// </summary>
            public bool IsChecked { get; set; }

            /// <summary>
            /// 留言
            /// </summary>
            public string Message { get; set; }
        }

        public class ActionRequest
        {
            /// <summary>
            /// 工作流Id
            /// </summary>
            public int FlowId { get; set; }
        }

        public class ActionTransferCheckRequest
        {
            /// <summary>
            /// 待办Id
            /// </summary>
            public int TodoId { get; set; }

            /// <summary>
            /// 转审用户Id列表
            /// </summary>
            public List<int> TransferUserIds { get; set; }

            /// <summary>
            /// 审批意见
            /// </summary>
            public string Message { get; set; }

            /// <summary>
            /// 附件Id列表
            /// </summary>
            public List<int> FileIds { get; set; }
        }

        public class DownloadResult
        {
            /// <summary>
            /// 下载地址
            /// </summary>
            public string DownloadUrl { get; set; }

            /// <summary>
            /// 预览
            /// </summary>
            public string PreviewUrl { get; set; }
        }
    }
}