namespace NPP.SmartSchedue.Api.Contracts.Services.Integration.Models
{
    /// <summary>
    /// 工作订单验证结果
    /// </summary>
    public class WorkOrderValidationResult
    {
        /// <summary>
        /// 验证是否通过
        /// </summary>
        public bool IsValid { get; set; }

        /// <summary>
        /// 错误消息
        /// </summary>
        public string ErrorMessage { get; set; } = string.Empty;

        /// <summary>
        /// 创建成功结果
        /// </summary>
        public static WorkOrderValidationResult Success()
        {
            return new WorkOrderValidationResult { IsValid = true };
        }

        /// <summary>
        /// 创建失败结果
        /// </summary>
        public static WorkOrderValidationResult Fail(string errorMessage)
        {
            return new WorkOrderValidationResult { IsValid = false, ErrorMessage = errorMessage };
        }
    }
}