using System.ComponentModel.DataAnnotations;
using Kurisu.Core.CustomClass;
namespace Dlhis.Basic.BusinessShift.Request;
public class BusinessPlaceShiftSaveMealShiftRequest : IValidatableObject
{
public long? Id { get; set; }
///
/// 餐次Code
///
public Guid ShiftCode { get; set; }
///
/// mealshift
///
public string ShiftType { get; set; }
///
/// 序号
///
public int Sequence { get; set; } = 100;
///
/// 时间段
///
public TimePeriod TimePeriod { get; set; }
public IEnumerable Validate(ValidationContext validationContext)
{
if (TimePeriod.Start == TimePeriod.End)
{
yield return new ValidationResult("时间段设置区间有误,开始时段不能等于结束时段.", new[] { nameof(TimePeriod) });
}
}
}