using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace YBDevice.NApi.Application.Prescription
{
///
/// 儿童处方数据标准
///
public class ChildPrescriptionS2SDto
{
///
/// BMI标准
///
public string BMILevel { get; set; }
///
/// 身高标准
///
public string HeightLevel { get; set; }
///
/// 体重标准
///
public string WeightLevel { get; set; }
///
/// 年龄,月龄
///
public int Age { get; set; }
}
///
/// 儿童体质列表
///
public class ChildPhysiqueS2CDto : ChildPhysiqueC2SDto
{
///
/// 文本
///
public string Text { get; set; }
}
///
/// 儿童体质结果
///
public class ChildPhysiqueResultS2CDto
{
///
/// 结果,为空时则表示没结果
///
public string Result { get; set; } = "";
///
/// 体质列表
///
public List list { get; set; }
}
///
/// 儿童体质计算
///
public class ChildPhysiqueCalcC2SDto
{
///
/// 家庭成员ID
///
public int FamilyId { get; set; }
///
/// 体质结果列表
///
public List data { get; set; }
}
///
/// 儿童体质信息
///
public class ChildPhysiqueC2SDto : IValidatableObject
{
///
/// 类型,1-饮食,2-睡眠,3-精神,4-头面,5-口鼻,6-皮肤,7-指甲,8-大小便,9-出汗,10-身高体重
///
public int Type { get; set; }
///
/// 分数
///
public int Value { get; set; }
///
/// ID
///
public Guid Id { get; set; }
public IEnumerable Validate(ValidationContext validationContext)
{
if (Id == Guid.Empty)
{
yield return new ValidationResult("请先选择", new[] { nameof(Id) });
}
}
}
}