namespace OpenAuth.Repository.Domain.workflow;

using SqlSugar;
using System;


    /// <summary>
    /// 流程会签记录表（zy_flow_parallel_audit）
    /// </summary>
    [SugarTable("zy_flow_parallel_audit")]
    public class ZyFlowParallelAudit
    {
        /// <summary>
        /// 审批记录ID（主键，自增）
        /// </summary>
        [SugarColumn(ColumnName = "audit_id", IsPrimaryKey = true, IsIdentity = true, IsNullable = false)]
        public long AuditId { get; set; }

        /// <summary>
        /// 流程实例ID（外键关联zy_flow_instance）
        /// </summary>
        [SugarColumn(ColumnName = "instance_id", IsNullable = false)]
        public long InstanceId { get; set; }

        /// <summary>
        /// 节点ID
        /// </summary>
        [SugarColumn(ColumnName = "node_id", IsNullable = false)]
        public long NodeId { get; set; }

        /// <summary>
        /// 部门名称
        /// </summary>
        [SugarColumn(ColumnName = "dept_name", IsNullable = false)]
        public string DeptName { get; set; } = string.Empty;

        /// <summary>
        /// 审批结果（Pass/Reject/Pending）
        /// </summary>
        [SugarColumn(ColumnName = "audit_result", IsNullable = false)]
        public string AuditResult { get; set; } = string.Empty;

        /// <summary>
        /// 审批意见
        /// </summary>
        [SugarColumn(ColumnName = "audit_comment", IsNullable = true)]
        public string? AuditComment { get; set; }

        /// <summary>
        /// 审批人ID
        /// </summary>
        [SugarColumn(ColumnName = "auditor_id", IsNullable = false)]
        public long AuditorId { get; set; }

        /// <summary>
        /// 审批人姓名
        /// </summary>
        [SugarColumn(ColumnName = "auditor_name", IsNullable = false)]
        public string AuditorName { get; set; } = string.Empty;

        /// <summary>
        /// 审批时间（默认当前时间）
        /// </summary>
        [SugarColumn(ColumnName = "audit_time", IsNullable = true)]
        public DateTime? AuditTime { get; set; } = DateTime.Now;
    }
