namespace Yw.Application
|
{
|
/// <summary>
|
/// 添加 指标自动评价模型
|
/// </summary>
|
public class AddHealthQuotaEvaluationModelAutoInput : IValidatableObject
|
{
|
|
/// <summary>
|
/// 名称
|
/// </summary>
|
[Required]
|
public string Name { get; set; }
|
|
/// <summary>
|
/// 评价标准
|
/// </summary>
|
[Required]
|
public AutoEvaluation Evaluation { get; set; }
|
|
/// <summary>
|
/// 缺省值
|
/// </summary>
|
[Required]
|
public double DefaultValue { get; set; }
|
|
/// <summary>
|
/// 说明
|
/// </summary>
|
public string Description { get; set; }
|
|
/// <summary>
|
///
|
/// </summary>
|
public IEnumerable<ValidationResult> Validate(ValidationContext validationContext)
|
{
|
if (this.Evaluation == null)
|
{
|
yield return new ValidationResult(
|
"Evaluation 不能为空"
|
, new[] { nameof(Evaluation) }
|
);
|
}
|
}
|
|
|
}
|
}
|