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

namespace GxPress.Entity.WorkFlowDto
{
    /// <summary>
    /// 添加工作流
    /// </summary>
    public class FlowDto
    {
        /// <summary>
        /// 工作流id
        /// </summary>
        public int Id { get; set; }

        /// <summary>
        /// 工作流规则id
        /// </summary>
        public int ProcessId { get; set; }

        /// <summary>
        /// 审批编号
        /// </summary>
        public string Guid { get; set; }

        /// <summary>
        /// 发起用户id
        /// </summary>
        public int UserId { get; set; }

        /// <summary>
        /// 流程表单字段列表
        /// </summary>
        public List<FlowField> Fields { get; set; }

        /// <summary>
        /// 流程状态(Meeting上会， Checked已通过， Denied已拒绝)
        /// </summary>
        public FlowState State { get; set; }

        /// <summary>
        /// 添加日期
        /// </summary>
        public DateTime? CreatedDate { get; set; }

        /// <summary>
        /// 当前流程节点
        /// </summary>
        public int ProcessNodeId { get; set; }

        /// <summary>
        /// 审核人Id列表
        /// </summary>
        public List<int> ApproverCheckUserIds { get; set; }

        /// <summary>
        /// 抄送人Id列表
        /// </summary>
        public List<int> CarbonCopyUserIds { get; set; }
        /// <summary>
        /// 新版附件
        /// </summary>
        /// <value></value>
        public List<Entity.WorkFlow.FlowAttachment> flowAttachments { get; set; }

        /// <summary>
        /// 审批编号
        /// </summary>
        public string No
        {
            get
            {
                return CreatedDate.HasValue ? CreatedDate.Value.ToString("yyyyMMddHHmmss") + Id.ToString().PadLeft(4, '0') : string.Empty;
            }
        }
        public FlowDto(){
            flowAttachments=new List<WorkFlow.FlowAttachment>();
        }

         /// <summary>
        /// 是否或签
        /// </summary>
        /// <value></value>
        public bool IsCaseOr{ get; set; }

          /// <summary>
        /// 父级ID
        /// </summary>
        /// <value></value>
        public int ParentId{ get; set; }
    }
}
