using SqlSugar;
using System;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json.Linq;

namespace OpenAuth.Repository.Domain
{
    [SugarTable("wf_process")]
    public class WFProcess
    {
        #region 实体成员 
        /// <summary> 
        /// 主键 
        /// </summary> 
        [SugarColumn(IsPrimaryKey = true)]
        public string Id { get; set; }
        /// <summary> 
        /// 流程模板主键 
        /// </summary> 
        public string SchemeId { get; set; }
        /// <summary> 
        /// 流程模板编码 
        /// </summary> 
        public string SchemeCode { get; set; }
        /// <summary> 
        /// 流程模板名称 
        /// </summary> 
        public string SchemeName { get; set; }
        /// <summary> 
        /// 流程进程自定义标题 
        /// </summary> 
        public string Title { get; set; }
        /// <summary> 
        /// 流程进程等级 
        /// </summary> 
        public int? Level { get; set; }
        /// <summary> 
        /// 流程进程有效标志 1正常2草稿3作废
        /// </summary> 
        public int? EnabledMark { get; set; }
        /// <summary> 
        /// 是否重新发起1是0不是 
        /// </summary> 
        public int? IsAgain { get; set; }
        /// <summary> 
        /// 流程进程是否结束1是0不是 
        /// </summary> 
        public int? IsFinished { get; set; }
        /// <summary> 
        /// 是否是子流程进程1是0不是 
        /// </summary> 
        public int? IsChild { get; set; }

        /// <summary> 
        /// 子流程执行方式1异步0同步
        /// </summary> 
        public int? IsAsyn { get; set; }
        /// <summary>
        /// 父流程的发起子流程的节点Id
        /// </summary>
        public string ParentNodeId { get; set; }
        /// <summary> 
        /// 流程进程父进程任务主键 
        /// </summary> 
        public string ParentTaskId { get; set; }
        /// <summary> 
        /// 流程进程父进程主键 
        /// </summary> 
        public string ParentProcessId { get; set; }
        /// <summary>
        /// 1表示开始处理过了 0 还没人处理过
        /// </summary>
        public int? IsStart { get; set; }
        /// <summary>
        /// 是否允许撤销 1 允许 0 不允许
        /// </summary>
        public int? IsCancel { get; set; }
        /// <summary> 
        /// 创建时间 
        /// </summary> 
        public DateTime? CreateDate { get; set; }
        /// <summary> 
        /// 创建人主键 
        /// </summary> 
        public string CreateUserId { get; set; }
        /// <summary> 
        /// 创建人名称 
        /// </summary> 
        public string CreateUserName { get; set; }
        /// <summary>
        /// 创建人账号
        /// </summary>
        public string CreateUserAccount { get; set; }
        /// <summary>
        /// 创建人公司
        /// </summary>
        public string CreateUserCompanyId { get; set; }
        /// <summary>
        /// 创建人部门
        /// </summary>
        public string CreateUserDepartmentId { get; set; }
        /// <summary>
        /// 实际创建人
        /// </summary>
        public string UserId { get; set; }

        [SugarColumn(IsJson = true)] 
        public WFInstanceInfo InstanceInfo { get; set; }
        #endregion

        #region 扩展字段
        /// <summary>
        /// 任务名称
        /// </summary>
        [SugarColumn(IsIgnore = true)]
        public string TaskName { get; set; }
        /// <summary>
        /// 任务主键
        /// </summary>
        [SugarColumn(IsIgnore = true)]
        public string TaskId { get; set; }
        /// <summary>
        /// 任务类型
        /// </summary>
        [SugarColumn(IsIgnore = true)]
        public int? TaskType { get; set; }

        /// <summary> 
        /// 是否被催办 1 被催办了
        /// </summary> 
        [SugarColumn(IsIgnore = true)]
        public int? IsUrge { get; set; }
        #endregion

    }
}
