using System.ComponentModel.DataAnnotations;
namespace CampusErrand.Models.Dtos;
///
/// 门店列表响应
///
public class ShopListResponse
{
public int Id { get; set; }
public string Name { get; set; } = string.Empty;
public string Photo { get; set; } = string.Empty;
public string Location { get; set; } = string.Empty;
/// 店内美食种类数量
public int DishCount { get; set; }
}
///
/// 门店详情响应(含菜品)
///
public class ShopDetailResponse
{
public int Id { get; set; }
public string Name { get; set; } = string.Empty;
public string Photo { get; set; } = string.Empty;
public string Location { get; set; } = string.Empty;
public string? Notice { get; set; }
public string PackingFeeType { get; set; } = string.Empty;
public decimal PackingFeeAmount { get; set; }
public bool IsEnabled { get; set; }
public List Banners { get; set; } = [];
public List Dishes { get; set; } = [];
}
///
/// 门店 Banner 响应
///
public class ShopBannerResponse
{
public int Id { get; set; }
public string ImageUrl { get; set; } = string.Empty;
public int SortOrder { get; set; }
}
///
/// 菜品响应
///
public class DishResponse
{
public int Id { get; set; }
public int ShopId { get; set; }
public string Name { get; set; } = string.Empty;
public string Photo { get; set; } = string.Empty;
public decimal Price { get; set; }
public bool IsEnabled { get; set; }
}
///
/// 管理端门店创建/更新请求
///
public class ShopRequest
{
[Required(ErrorMessage = "门店名称不能为空")]
[MaxLength(64)]
public string Name { get; set; } = string.Empty;
[Required(ErrorMessage = "门店照片不能为空")]
[MaxLength(512)]
public string Photo { get; set; } = string.Empty;
[Required(ErrorMessage = "门店位置不能为空")]
[MaxLength(256)]
public string Location { get; set; } = string.Empty;
[MaxLength(1024)]
public string? Notice { get; set; }
[Required(ErrorMessage = "打包费类型不能为空")]
public string PackingFeeType { get; set; } = string.Empty;
public decimal PackingFeeAmount { get; set; }
public bool IsEnabled { get; set; } = true;
}
///
/// 管理端菜品创建/更新请求
///
public class DishRequest
{
[Required(ErrorMessage = "菜品名称不能为空")]
[MaxLength(64)]
public string Name { get; set; } = string.Empty;
[Required(ErrorMessage = "菜品照片不能为空")]
[MaxLength(512)]
public string Photo { get; set; } = string.Empty;
public decimal Price { get; set; }
public bool IsEnabled { get; set; } = true;
}
///
/// 管理端门店 Banner 创建/更新请求
///
public class ShopBannerRequest
{
[Required(ErrorMessage = "图片地址不能为空")]
[MaxLength(512)]
public string ImageUrl { get; set; } = string.Empty;
public int SortOrder { get; set; }
}
///
/// 管理端门店响应(含完整信息)
///
public class AdminShopResponse
{
public int Id { get; set; }
public string Name { get; set; } = string.Empty;
public string Photo { get; set; } = string.Empty;
public string Location { get; set; } = string.Empty;
public string? Notice { get; set; }
public string PackingFeeType { get; set; } = string.Empty;
public decimal PackingFeeAmount { get; set; }
public bool IsEnabled { get; set; }
public int DishCount { get; set; }
}