using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using XF.Domain.Repository;

namespace Hotline.Orders
{
	public class OrderScreenDetail : FullStateEntity
	{
		/// <summary>
		/// 甄别Id
		/// </summary>
		[SugarColumn(ColumnDescription = "甄别Id")]
		public string ScreenId { get; set; }

		/// <summary>
		/// 审批人
		/// </summary>
		[SugarColumn(ColumnDescription = "审批人")]
		public string? AuditUserName { get; set; }

		/// <summary>
		/// 审批人
		/// </summary>
		[SugarColumn(ColumnDescription = "审批人id")]
		public string? AuditUserId { get; set; }

		/// <summary>
		/// 审批机构ID
		/// </summary>
		[SugarColumn(ColumnDescription = "审批机构ID")]
		public string? AuditOrgId { get; set; }

		/// <summary>
		/// 审批机构
		/// </summary>
		[SugarColumn(ColumnDescription = "审批机构")]
		public string? AuditOrgName { get; set; }

		/// <summary>
		/// 审批时间
		/// </summary>
		[SugarColumn(ColumnDescription = "审批时间")]
		public DateTime? AuditTime { get; set; }

		/// <summary>
		/// 审批类型   1 审批  2 退回
		/// </summary>
		[SugarColumn(ColumnDescription = "审批类型   1 审批  2 退回")]
		public int AuditType { get; set; }

		public void Audit(string userId, string userName, string userOrgId, string userOrgName,int auditType) {
			AuditUserId = userId;
			AuditUserName = userName;
			AuditOrgId = userOrgId;
			AuditOrgName = userOrgName;
			AuditTime = DateTime.Now;
			AuditType = auditType;
		}
	}

}
