Files
jinko.yikatong/Src/Dlhis.Canteen/Order/Response/OrderAggregationResponse.cs
2024-03-19 20:53:16 +08:00

52 lines
896 B
C#

using Kurisu.AspNetCore.Utils.Extensions;
namespace Dlhis.Canteen.Order.Response;
public class OrderAggregationResponse
{
public string No { get; set; }
/// <summary>
/// 营业点
/// </summary>
public string BusinessPlaceName { get; set; }
/// <summary>
/// 购买菜品
/// </summary>
public List<DishesDto> Dishes { get; set; }
/// <summary>
/// 金额
/// </summary>
public decimal Amount
{
get
{
if (Dishes.IsPresent())
{
return Dishes.Sum(x => x.Number * x.Price);
}
return 0;
}
}
/// <summary>
/// 共计数量
/// </summary>
public int Count
{
get
{
if (Dishes.IsPresent())
{
return Dishes.Count;
}
return 0;
}
}
}