922 lines
20 KiB
C#
922 lines
20 KiB
C#
using System.Text.Json.Serialization;
|
||
using HoneyBox.Model.Models;
|
||
|
||
namespace HoneyBox.Model.Models.Goods;
|
||
|
||
#region Request Models
|
||
|
||
/// <summary>
|
||
/// 商品列表请求
|
||
/// </summary>
|
||
public class GoodsListRequest : PageRequest
|
||
{
|
||
/// <summary>
|
||
/// 分类ID
|
||
/// </summary>
|
||
public int? CategoryId { get; set; }
|
||
|
||
/// <summary>
|
||
/// 商品类型 (-1表示全部)
|
||
/// </summary>
|
||
[JsonPropertyName("type")]
|
||
public int Type { get; set; } = -1;
|
||
}
|
||
|
||
/// <summary>
|
||
/// 商品详情请求
|
||
/// </summary>
|
||
public class GoodsDetailRequest
|
||
{
|
||
/// <summary>
|
||
/// 商品ID
|
||
/// </summary>
|
||
[JsonPropertyName("goods_id")]
|
||
public int GoodsId { get; set; }
|
||
|
||
/// <summary>
|
||
/// 箱号 (0表示自动选择)
|
||
/// </summary>
|
||
[JsonPropertyName("goods_num")]
|
||
public int GoodsNum { get; set; } = 0;
|
||
}
|
||
|
||
/// <summary>
|
||
/// 商品子奖品请求
|
||
/// </summary>
|
||
public class GoodsChildrenRequest
|
||
{
|
||
/// <summary>
|
||
/// 商品ID
|
||
/// </summary>
|
||
[JsonPropertyName("goods_id")]
|
||
public int GoodsId { get; set; }
|
||
|
||
/// <summary>
|
||
/// 箱号
|
||
/// </summary>
|
||
[JsonPropertyName("goods_num")]
|
||
public int GoodsNum { get; set; }
|
||
|
||
/// <summary>
|
||
/// 奖品列表ID
|
||
/// </summary>
|
||
[JsonPropertyName("goods_list_id")]
|
||
public int GoodsListId { get; set; }
|
||
}
|
||
|
||
/// <summary>
|
||
/// 商品扩展配置请求
|
||
/// </summary>
|
||
public class GoodsExtendRequest
|
||
{
|
||
/// <summary>
|
||
/// 商品ID
|
||
/// </summary>
|
||
[JsonPropertyName("goods_id")]
|
||
public int GoodsId { get; set; }
|
||
|
||
/// <summary>
|
||
/// 商品类型
|
||
/// </summary>
|
||
[JsonPropertyName("goods_type")]
|
||
public int GoodsType { get; set; }
|
||
}
|
||
|
||
/// <summary>
|
||
/// 箱号列表请求
|
||
/// </summary>
|
||
public class BoxListRequest
|
||
{
|
||
/// <summary>
|
||
/// 商品ID
|
||
/// </summary>
|
||
[JsonPropertyName("goods_id")]
|
||
public int GoodsId { get; set; }
|
||
}
|
||
|
||
/// <summary>
|
||
/// 箱号详情请求
|
||
/// </summary>
|
||
public class BoxDetailRequest
|
||
{
|
||
/// <summary>
|
||
/// 商品ID
|
||
/// </summary>
|
||
[JsonPropertyName("goods_id")]
|
||
public int GoodsId { get; set; }
|
||
|
||
/// <summary>
|
||
/// 页码 (每页10个箱号)
|
||
/// </summary>
|
||
[JsonPropertyName("page_no")]
|
||
public int PageNo { get; set; } = 0;
|
||
|
||
/// <summary>
|
||
/// 排序方式: 0=箱号升序, 1=箱号降序, 2=余量降序
|
||
/// </summary>
|
||
[JsonPropertyName("sort")]
|
||
public int Sort { get; set; } = 0;
|
||
}
|
||
|
||
/// <summary>
|
||
/// 奖品数量统计请求
|
||
/// </summary>
|
||
public class PrizeCountRequest
|
||
{
|
||
/// <summary>
|
||
/// 商品ID
|
||
/// </summary>
|
||
[JsonPropertyName("goods_id")]
|
||
public int GoodsId { get; set; }
|
||
}
|
||
|
||
/// <summary>
|
||
/// 奖品内容请求
|
||
/// </summary>
|
||
public class PrizeContentRequest
|
||
{
|
||
/// <summary>
|
||
/// 商品ID
|
||
/// </summary>
|
||
[JsonPropertyName("goods_id")]
|
||
public int GoodsId { get; set; }
|
||
|
||
/// <summary>
|
||
/// 箱号
|
||
/// </summary>
|
||
[JsonPropertyName("num")]
|
||
public int Num { get; set; }
|
||
}
|
||
|
||
/// <summary>
|
||
/// 中奖记录请求
|
||
/// </summary>
|
||
public class PrizeLogsRequest : PageRequest
|
||
{
|
||
/// <summary>
|
||
/// 商品ID
|
||
/// </summary>
|
||
[JsonPropertyName("goods_id")]
|
||
public int GoodsId { get; set; }
|
||
|
||
/// <summary>
|
||
/// 箱号
|
||
/// </summary>
|
||
[JsonPropertyName("goods_num")]
|
||
public int GoodsNum { get; set; }
|
||
|
||
/// <summary>
|
||
/// 赏品分类ID (0表示全部)
|
||
/// </summary>
|
||
[JsonPropertyName("shang_id")]
|
||
public int ShangId { get; set; } = 0;
|
||
}
|
||
|
||
#endregion
|
||
|
||
#region Response/DTO Models
|
||
|
||
/// <summary>
|
||
/// 商品列表项DTO (兼容PHP API snake_case格式)
|
||
/// </summary>
|
||
public class GoodsListDto
|
||
{
|
||
/// <summary>
|
||
/// 商品ID
|
||
/// </summary>
|
||
[JsonPropertyName("id")]
|
||
public int Id { get; set; }
|
||
|
||
/// <summary>
|
||
/// 商品标题
|
||
/// </summary>
|
||
[JsonPropertyName("title")]
|
||
public string Title { get; set; } = string.Empty;
|
||
|
||
/// <summary>
|
||
/// 商品图片URL
|
||
/// </summary>
|
||
[JsonPropertyName("img_url")]
|
||
public string ImgUrl { get; set; } = string.Empty;
|
||
|
||
/// <summary>
|
||
/// 商品价格
|
||
/// </summary>
|
||
[JsonPropertyName("price")]
|
||
public string Price { get; set; } = "0";
|
||
|
||
/// <summary>
|
||
/// 商品类型
|
||
/// </summary>
|
||
[JsonPropertyName("type")]
|
||
public int Type { get; set; }
|
||
|
||
/// <summary>
|
||
/// 类型文字
|
||
/// </summary>
|
||
[JsonPropertyName("type_text")]
|
||
public string TypeText { get; set; } = string.Empty;
|
||
|
||
/// <summary>
|
||
/// 总库存
|
||
/// </summary>
|
||
[JsonPropertyName("stock")]
|
||
public int Stock { get; set; }
|
||
|
||
/// <summary>
|
||
/// 已售库存
|
||
/// </summary>
|
||
[JsonPropertyName("sale_stock")]
|
||
public int SaleStock { get; set; }
|
||
|
||
/// <summary>
|
||
/// 状态
|
||
/// </summary>
|
||
[JsonPropertyName("status")]
|
||
public int Status { get; set; }
|
||
|
||
/// <summary>
|
||
/// 是否锁定
|
||
/// </summary>
|
||
[JsonPropertyName("lock_is")]
|
||
public int LockIs { get; set; }
|
||
|
||
/// <summary>
|
||
/// 是否首折
|
||
/// </summary>
|
||
[JsonPropertyName("is_shou_zhe")]
|
||
public int IsShouZhe { get; set; }
|
||
|
||
/// <summary>
|
||
/// 是否新品
|
||
/// </summary>
|
||
[JsonPropertyName("new_is")]
|
||
public int NewIs { get; set; }
|
||
|
||
/// <summary>
|
||
/// 参与次数
|
||
/// </summary>
|
||
[JsonPropertyName("join_count")]
|
||
public int JoinCount { get; set; }
|
||
|
||
/// <summary>
|
||
/// 需要抽奖次数
|
||
/// </summary>
|
||
[JsonPropertyName("need_draw_num")]
|
||
public int NeedDrawNum { get; set; }
|
||
|
||
/// <summary>
|
||
/// 显示价格
|
||
/// </summary>
|
||
[JsonPropertyName("show_price")]
|
||
public string? ShowPrice { get; set; }
|
||
|
||
/// <summary>
|
||
/// 角标文字
|
||
/// </summary>
|
||
[JsonPropertyName("corner_text")]
|
||
public string? CornerText { get; set; }
|
||
}
|
||
|
||
/// <summary>
|
||
/// 商品信息DTO
|
||
/// </summary>
|
||
public class GoodsInfoDto
|
||
{
|
||
[JsonPropertyName("id")]
|
||
public int Id { get; set; }
|
||
|
||
[JsonPropertyName("title")]
|
||
public string Title { get; set; } = string.Empty;
|
||
|
||
[JsonPropertyName("imgurl_detail")]
|
||
public string ImgUrlDetail { get; set; } = string.Empty;
|
||
|
||
[JsonPropertyName("price")]
|
||
public string Price { get; set; } = "0";
|
||
|
||
[JsonPropertyName("stock")]
|
||
public int Stock { get; set; }
|
||
|
||
[JsonPropertyName("sale_stock")]
|
||
public int SaleStock { get; set; }
|
||
|
||
[JsonPropertyName("surplus_stock")]
|
||
public int SurplusStock { get; set; }
|
||
|
||
[JsonPropertyName("goodslist_stock")]
|
||
public int GoodslistStock { get; set; }
|
||
|
||
[JsonPropertyName("goodslist_surplus_stock")]
|
||
public int GoodslistSurplusStock { get; set; }
|
||
|
||
[JsonPropertyName("type")]
|
||
public int Type { get; set; }
|
||
|
||
[JsonPropertyName("type_text")]
|
||
public string? TypeText { get; set; }
|
||
|
||
[JsonPropertyName("status")]
|
||
public int Status { get; set; }
|
||
|
||
[JsonPropertyName("lock_is")]
|
||
public int LockIs { get; set; }
|
||
|
||
[JsonPropertyName("num")]
|
||
public int Num { get; set; }
|
||
|
||
[JsonPropertyName("addtime")]
|
||
public string? Addtime { get; set; }
|
||
|
||
[JsonPropertyName("goods_describe")]
|
||
public string? GoodsDescribe { get; set; }
|
||
|
||
[JsonPropertyName("coupon_is")]
|
||
public int CouponIs { get; set; }
|
||
|
||
[JsonPropertyName("coupon_pro")]
|
||
public int CouponPro { get; set; }
|
||
|
||
[JsonPropertyName("integral_is")]
|
||
public int IntegralIs { get; set; }
|
||
|
||
[JsonPropertyName("rage_is")]
|
||
public int RageIs { get; set; }
|
||
|
||
[JsonPropertyName("rage")]
|
||
public int Rage { get; set; }
|
||
|
||
[JsonPropertyName("lingzhu_is")]
|
||
public int LingzhuIs { get; set; }
|
||
|
||
[JsonPropertyName("lingzhu_fan")]
|
||
public int LingzhuFan { get; set; }
|
||
|
||
[JsonPropertyName("card_num")]
|
||
public int CardNum { get; set; }
|
||
|
||
[JsonPropertyName("is_shou_zhe")]
|
||
public int IsShouZhe { get; set; }
|
||
|
||
[JsonPropertyName("new_is")]
|
||
public int NewIs { get; set; }
|
||
|
||
[JsonPropertyName("collection_is")]
|
||
public int CollectionIs { get; set; }
|
||
|
||
[JsonPropertyName("three_time")]
|
||
public int ThreeTime { get; set; }
|
||
|
||
[JsonPropertyName("five_time")]
|
||
public int FiveTime { get; set; }
|
||
|
||
[JsonPropertyName("quanju_xiangou")]
|
||
public int QuanjuXiangou { get; set; }
|
||
|
||
[JsonPropertyName("daily_xiangou")]
|
||
public int DailyXiangou { get; set; }
|
||
|
||
[JsonPropertyName("prize_num")]
|
||
public int PrizeNum { get; set; }
|
||
}
|
||
|
||
|
||
/// <summary>
|
||
/// 商品详情响应
|
||
/// </summary>
|
||
public class GoodsDetailResponseDto
|
||
{
|
||
/// <summary>
|
||
/// 商品信息
|
||
/// </summary>
|
||
[JsonPropertyName("goods")]
|
||
public GoodsInfoDto Goods { get; set; } = new();
|
||
|
||
/// <summary>
|
||
/// 锁箱信息
|
||
/// </summary>
|
||
[JsonPropertyName("lock_info")]
|
||
public LockInfoDto LockInfo { get; set; } = new();
|
||
|
||
/// <summary>
|
||
/// 参与用户头像列表
|
||
/// </summary>
|
||
[JsonPropertyName("join_user")]
|
||
public List<string> JoinUser { get; set; } = new();
|
||
|
||
/// <summary>
|
||
/// 参与次数
|
||
/// </summary>
|
||
[JsonPropertyName("join_count")]
|
||
public int JoinCount { get; set; }
|
||
|
||
/// <summary>
|
||
/// 奖品列表
|
||
/// </summary>
|
||
[JsonPropertyName("goodslist")]
|
||
public List<GoodsListItemDto> GoodsList { get; set; } = new();
|
||
|
||
/// <summary>
|
||
/// 限购信息
|
||
/// </summary>
|
||
[JsonPropertyName("limit_info")]
|
||
public LimitInfoDto LimitInfo { get; set; } = new();
|
||
}
|
||
|
||
/// <summary>
|
||
/// 锁箱信息DTO
|
||
/// </summary>
|
||
public class LockInfoDto
|
||
{
|
||
/// <summary>
|
||
/// 是否锁定
|
||
/// </summary>
|
||
[JsonPropertyName("lock_is")]
|
||
public int LockIs { get; set; }
|
||
|
||
/// <summary>
|
||
/// 锁定用户昵称
|
||
/// </summary>
|
||
[JsonPropertyName("goods_lock_user_nickname")]
|
||
public string? GoodsLockUserNickname { get; set; }
|
||
|
||
/// <summary>
|
||
/// 锁定用户头像
|
||
/// </summary>
|
||
[JsonPropertyName("goods_lock_user_headimg")]
|
||
public string? GoodsLockUserHeadimg { get; set; }
|
||
|
||
/// <summary>
|
||
/// 锁箱剩余时间 (Unix时间戳)
|
||
/// </summary>
|
||
[JsonPropertyName("goods_lock_surplus_time")]
|
||
public long GoodsLockSurplusTime { get; set; }
|
||
}
|
||
|
||
/// <summary>
|
||
/// 限购信息DTO
|
||
/// </summary>
|
||
public class LimitInfoDto
|
||
{
|
||
/// <summary>
|
||
/// 每日限购数量
|
||
/// </summary>
|
||
[JsonPropertyName("daily_xiangou")]
|
||
public int DailyXiangou { get; set; }
|
||
|
||
/// <summary>
|
||
/// 今日已购数量
|
||
/// </summary>
|
||
[JsonPropertyName("daily_bought")]
|
||
public int DailyBought { get; set; }
|
||
|
||
/// <summary>
|
||
/// 今日剩余可购数量
|
||
/// </summary>
|
||
[JsonPropertyName("daily_remaining")]
|
||
public int DailyRemaining { get; set; }
|
||
|
||
/// <summary>
|
||
/// 全局限购数量
|
||
/// </summary>
|
||
[JsonPropertyName("quanju_xiangou")]
|
||
public int QuanjuXiangou { get; set; }
|
||
|
||
/// <summary>
|
||
/// 全局已购数量
|
||
/// </summary>
|
||
[JsonPropertyName("global_bought")]
|
||
public int GlobalBought { get; set; }
|
||
|
||
/// <summary>
|
||
/// 全局剩余可购数量
|
||
/// </summary>
|
||
[JsonPropertyName("global_remaining")]
|
||
public int GlobalRemaining { get; set; }
|
||
}
|
||
|
||
/// <summary>
|
||
/// 奖品列表项DTO
|
||
/// </summary>
|
||
public class GoodsListItemDto
|
||
{
|
||
[JsonPropertyName("id")]
|
||
public int Id { get; set; }
|
||
|
||
[JsonPropertyName("shang_id")]
|
||
public int ShangId { get; set; }
|
||
|
||
[JsonPropertyName("shang_info")]
|
||
public ShangInfoDto? ShangInfo { get; set; }
|
||
|
||
[JsonPropertyName("title")]
|
||
public string Title { get; set; } = string.Empty;
|
||
|
||
[JsonPropertyName("stock")]
|
||
public int Stock { get; set; }
|
||
|
||
[JsonPropertyName("surplus_stock")]
|
||
public int SurplusStock { get; set; }
|
||
|
||
[JsonPropertyName("img_url")]
|
||
public string ImgUrl { get; set; } = string.Empty;
|
||
|
||
[JsonPropertyName("goods_type")]
|
||
public int GoodsType { get; set; }
|
||
|
||
[JsonPropertyName("price")]
|
||
public string Price { get; set; } = "0";
|
||
|
||
[JsonPropertyName("sc_money")]
|
||
public string ScMoney { get; set; } = "0";
|
||
|
||
[JsonPropertyName("sale_time")]
|
||
public string? SaleTime { get; set; }
|
||
|
||
[JsonPropertyName("pro")]
|
||
public string Pro { get; set; } = "0";
|
||
|
||
[JsonPropertyName("children")]
|
||
public bool Children { get; set; }
|
||
|
||
[JsonPropertyName("real_pro")]
|
||
public string RealPro { get; set; } = "0";
|
||
}
|
||
|
||
/// <summary>
|
||
/// 赏品等级信息DTO
|
||
/// </summary>
|
||
public class ShangInfoDto
|
||
{
|
||
[JsonPropertyName("id")]
|
||
public int Id { get; set; }
|
||
|
||
[JsonPropertyName("title")]
|
||
public string Title { get; set; } = string.Empty;
|
||
|
||
[JsonPropertyName("img_url")]
|
||
public string? ImgUrl { get; set; }
|
||
|
||
[JsonPropertyName("color")]
|
||
public string? Color { get; set; }
|
||
|
||
[JsonPropertyName("special_img_url")]
|
||
public string? SpecialImgUrl { get; set; }
|
||
}
|
||
|
||
/// <summary>
|
||
/// 子奖品DTO
|
||
/// </summary>
|
||
public class GoodsChildrenDto
|
||
{
|
||
[JsonPropertyName("id")]
|
||
public int Id { get; set; }
|
||
|
||
[JsonPropertyName("shang_id")]
|
||
public int ShangId { get; set; }
|
||
|
||
[JsonPropertyName("title")]
|
||
public string Title { get; set; } = string.Empty;
|
||
|
||
[JsonPropertyName("imgurl")]
|
||
public string ImgUrl { get; set; } = string.Empty;
|
||
|
||
[JsonPropertyName("stock")]
|
||
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
|
||
public int Stock { get; set; }
|
||
|
||
[JsonPropertyName("surplus_stock")]
|
||
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
|
||
public int SurplusStock { get; set; }
|
||
|
||
[JsonPropertyName("goods_type")]
|
||
public int GoodsType { get; set; }
|
||
|
||
[JsonPropertyName("sale_time")]
|
||
public string? SaleTime { get; set; }
|
||
|
||
[JsonPropertyName("price")]
|
||
public string Price { get; set; } = "0";
|
||
|
||
[JsonPropertyName("sc_money")]
|
||
public string ScMoney { get; set; } = "0";
|
||
|
||
[JsonPropertyName("real_pro")]
|
||
public string RealPro { get; set; } = "0";
|
||
|
||
[JsonPropertyName("pro")]
|
||
public string Pro { get; set; } = "0";
|
||
|
||
[JsonPropertyName("pro_num")]
|
||
public string ProNum { get; set; } = "0";
|
||
|
||
[JsonPropertyName("shang_info")]
|
||
public ShangInfoDto? ShangInfo { get; set; }
|
||
}
|
||
|
||
/// <summary>
|
||
/// 商品扩展配置DTO
|
||
/// </summary>
|
||
public class GoodsExtendDto
|
||
{
|
||
[JsonPropertyName("pay_wechat")]
|
||
public int PayWechat { get; set; }
|
||
|
||
[JsonPropertyName("pay_balance")]
|
||
public int PayBalance { get; set; }
|
||
|
||
[JsonPropertyName("pay_currency")]
|
||
public int PayCurrency { get; set; }
|
||
|
||
[JsonPropertyName("pay_currency2")]
|
||
public int PayCurrency2 { get; set; }
|
||
|
||
[JsonPropertyName("pay_coupon")]
|
||
public int PayCoupon { get; set; }
|
||
|
||
[JsonPropertyName("is_deduction")]
|
||
public int IsDeduction { get; set; }
|
||
}
|
||
|
||
/// <summary>
|
||
/// 箱号分组DTO
|
||
/// </summary>
|
||
public class BoxGroupDto
|
||
{
|
||
/// <summary>
|
||
/// 显示标题,如 "1-10"
|
||
/// </summary>
|
||
[JsonPropertyName("title")]
|
||
public string Title { get; set; } = string.Empty;
|
||
|
||
/// <summary>
|
||
/// 页码(从0开始)
|
||
/// </summary>
|
||
[JsonPropertyName("page_no")]
|
||
public int PageNo { get; set; }
|
||
}
|
||
|
||
/// <summary>
|
||
/// 箱号详情DTO
|
||
/// </summary>
|
||
public class BoxDetailDto
|
||
{
|
||
[JsonPropertyName("num")]
|
||
public int Num { get; set; }
|
||
|
||
[JsonPropertyName("surplus_all_stock")]
|
||
public int SurplusAllStock { get; set; }
|
||
|
||
[JsonPropertyName("goodslist")]
|
||
public List<BoxGoodsListDto> GoodsList { get; set; } = new();
|
||
}
|
||
|
||
/// <summary>
|
||
/// 箱号商品列表DTO
|
||
/// </summary>
|
||
public class BoxGoodsListDto
|
||
{
|
||
[JsonPropertyName("id")]
|
||
public int Id { get; set; }
|
||
|
||
[JsonPropertyName("shang_id")]
|
||
public int ShangId { get; set; }
|
||
|
||
[JsonPropertyName("shang_info")]
|
||
public ShangInfoDto? ShangInfo { get; set; }
|
||
|
||
[JsonPropertyName("title")]
|
||
public string Title { get; set; } = string.Empty;
|
||
|
||
[JsonPropertyName("surplus_stock")]
|
||
public int SurplusStock { get; set; }
|
||
|
||
[JsonPropertyName("stock")]
|
||
public int Stock { get; set; }
|
||
}
|
||
|
||
|
||
#endregion
|
||
|
||
#region Collection Models
|
||
|
||
/// <summary>
|
||
/// 收藏请求
|
||
/// </summary>
|
||
public class CollectionRequest
|
||
{
|
||
/// <summary>
|
||
/// 商品ID
|
||
/// </summary>
|
||
[JsonPropertyName("goods_id")]
|
||
public int GoodsId { get; set; }
|
||
|
||
/// <summary>
|
||
/// 箱号
|
||
/// </summary>
|
||
[JsonPropertyName("goods_num")]
|
||
public int GoodsNum { get; set; }
|
||
|
||
/// <summary>
|
||
/// 操作类型: add=收藏, remove=取消收藏
|
||
/// </summary>
|
||
[JsonPropertyName("action")]
|
||
public string Action { get; set; } = "add";
|
||
}
|
||
|
||
/// <summary>
|
||
/// 收藏列表请求
|
||
/// </summary>
|
||
public class CollectionListRequest : PageRequest
|
||
{
|
||
/// <summary>
|
||
/// 商品类型 (0=全部)
|
||
/// </summary>
|
||
[JsonPropertyName("type")]
|
||
public int Type { get; set; } = 0;
|
||
}
|
||
|
||
/// <summary>
|
||
/// 收藏列表响应 (兼容PHP API格式)
|
||
/// </summary>
|
||
public class CollectionListResponse
|
||
{
|
||
[JsonPropertyName("data")]
|
||
public List<CollectionDto> Data { get; set; } = new();
|
||
|
||
[JsonPropertyName("last_page")]
|
||
public int LastPage { get; set; }
|
||
}
|
||
|
||
/// <summary>
|
||
/// 收藏DTO (兼容PHP API格式)
|
||
/// </summary>
|
||
public class CollectionDto
|
||
{
|
||
[JsonPropertyName("id")]
|
||
public int Id { get; set; }
|
||
|
||
[JsonPropertyName("goods_id")]
|
||
public int GoodsId { get; set; }
|
||
|
||
[JsonPropertyName("type")]
|
||
public int Type { get; set; }
|
||
|
||
[JsonPropertyName("num")]
|
||
public int Num { get; set; }
|
||
|
||
[JsonPropertyName("goods_title")]
|
||
public string GoodsTitle { get; set; } = string.Empty;
|
||
|
||
[JsonPropertyName("goods_price")]
|
||
public string GoodsPrice { get; set; } = "0";
|
||
|
||
[JsonPropertyName("imgurl")]
|
||
public string ImgUrl { get; set; } = string.Empty;
|
||
|
||
[JsonPropertyName("stock")]
|
||
public int Stock { get; set; }
|
||
|
||
[JsonPropertyName("surplus_stock")]
|
||
public int SurplusStock { get; set; }
|
||
}
|
||
|
||
/// <summary>
|
||
/// 删除收藏请求
|
||
/// </summary>
|
||
public class DeleteCollectionRequest
|
||
{
|
||
/// <summary>
|
||
/// 收藏记录ID
|
||
/// </summary>
|
||
[JsonPropertyName("id")]
|
||
public int Id { get; set; }
|
||
}
|
||
|
||
#endregion
|
||
|
||
#region Prize Statistics Models
|
||
|
||
/// <summary>
|
||
/// 奖品数量统计响应
|
||
/// </summary>
|
||
public class PrizeCountResponseDto
|
||
{
|
||
[JsonPropertyName("list")]
|
||
public List<PrizeCountItemDto> List { get; set; } = new();
|
||
|
||
[JsonPropertyName("total")]
|
||
public int Total { get; set; }
|
||
|
||
[JsonPropertyName("surplus")]
|
||
public int Surplus { get; set; }
|
||
}
|
||
|
||
/// <summary>
|
||
/// 奖品数量统计项DTO
|
||
/// </summary>
|
||
public class PrizeCountItemDto
|
||
{
|
||
[JsonPropertyName("shang_id")]
|
||
public int ShangId { get; set; }
|
||
|
||
[JsonPropertyName("shang_info")]
|
||
public ShangInfoDto? ShangInfo { get; set; }
|
||
|
||
[JsonPropertyName("total")]
|
||
public int Total { get; set; }
|
||
|
||
[JsonPropertyName("surplus")]
|
||
public int Surplus { get; set; }
|
||
}
|
||
|
||
/// <summary>
|
||
/// 奖品内容响应
|
||
/// </summary>
|
||
public class PrizeContentResponseDto
|
||
{
|
||
[JsonPropertyName("list")]
|
||
public List<GoodsListItemDto> List { get; set; } = new();
|
||
}
|
||
|
||
#endregion
|
||
|
||
#region Prize Logs Models
|
||
|
||
/// <summary>
|
||
/// 中奖记录响应
|
||
/// </summary>
|
||
public class PrizeLogsResponseDto
|
||
{
|
||
[JsonPropertyName("category")]
|
||
public List<CategoryDto> Category { get; set; } = new();
|
||
|
||
[JsonPropertyName("data")]
|
||
public List<PrizeLogDto> Data { get; set; } = new();
|
||
|
||
[JsonPropertyName("last_page")]
|
||
public int LastPage { get; set; }
|
||
|
||
[JsonPropertyName("total")]
|
||
public int Total { get; set; }
|
||
}
|
||
|
||
/// <summary>
|
||
/// 分类DTO - 用于中奖记录筛选
|
||
/// </summary>
|
||
public class CategoryDto
|
||
{
|
||
[JsonPropertyName("shang_id")]
|
||
public int ShangId { get; set; }
|
||
|
||
[JsonPropertyName("shang_title")]
|
||
public string ShangTitle { get; set; } = string.Empty;
|
||
}
|
||
|
||
/// <summary>
|
||
/// 中奖记录DTO - 匹配PHP API响应格式
|
||
/// </summary>
|
||
public class PrizeLogDto
|
||
{
|
||
[JsonPropertyName("user_id")]
|
||
public int UserId { get; set; }
|
||
|
||
[JsonPropertyName("goodslist_title")]
|
||
public string GoodslistTitle { get; set; } = string.Empty;
|
||
|
||
[JsonPropertyName("goodslist_imgurl")]
|
||
public string GoodslistImgurl { get; set; } = string.Empty;
|
||
|
||
[JsonPropertyName("shang_id")]
|
||
public int ShangId { get; set; }
|
||
|
||
[JsonPropertyName("addtime")]
|
||
public string Addtime { get; set; } = string.Empty;
|
||
|
||
[JsonPropertyName("prize_num")]
|
||
public int PrizeNum { get; set; }
|
||
|
||
[JsonPropertyName("shang_title")]
|
||
public string ShangTitle { get; set; } = string.Empty;
|
||
|
||
[JsonPropertyName("user_info")]
|
||
public PrizeLogUserDto? UserInfo { get; set; }
|
||
|
||
[JsonPropertyName("shang_color")]
|
||
public string ShangColor { get; set; } = string.Empty;
|
||
}
|
||
|
||
/// <summary>
|
||
/// 中奖记录用户信息DTO
|
||
/// </summary>
|
||
public class PrizeLogUserDto
|
||
{
|
||
[JsonPropertyName("nickname")]
|
||
public string Nickname { get; set; } = string.Empty;
|
||
|
||
[JsonPropertyName("headimg")]
|
||
public string HeadImg { get; set; } = string.Empty;
|
||
}
|
||
|
||
#endregion
|