using System.Collections.Generic;
namespace NPP.SmartSchedue.Api.Contracts.Services.Notification.Output;
///
/// 模板验证结果
///
public class TemplateValidationResult
{
///
/// 是否验证通过
///
public bool IsValid { get; set; } = true;
///
/// 错误信息列表
///
public List Errors { get; set; } = new List();
///
/// 警告信息列表
///
public List Warnings { get; set; } = new List();
///
/// 发现的变量列表
///
public List Variables { get; set; } = new List();
///
/// 添加错误信息
///
/// 错误信息
public void AddError(string error)
{
IsValid = false;
Errors.Add(error);
}
///
/// 添加警告信息
///
/// 警告信息
public void AddWarning(string warning)
{
Warnings.Add(warning);
}
}