This commit is contained in:
parent
5e762f2067
commit
780ab64d83
|
@ -17,20 +17,33 @@ import java.util.Map;
|
|||
@NoArgsConstructor
|
||||
public class Dish {
|
||||
private String id;
|
||||
/**
|
||||
* 商家的ID
|
||||
*/
|
||||
private String shopId;
|
||||
/**
|
||||
* 分类名
|
||||
*/
|
||||
private String group;
|
||||
/**
|
||||
* 菜品名
|
||||
*/
|
||||
private String name;
|
||||
/**
|
||||
* 价格(分)
|
||||
*/
|
||||
private Integer price;
|
||||
/**
|
||||
* 销量
|
||||
*/
|
||||
private Integer sellCount;
|
||||
/**
|
||||
* 图片链接
|
||||
*/
|
||||
@Nullable
|
||||
private String image;
|
||||
/**
|
||||
* 子选项
|
||||
* [key: 类型,如“辣度选择”] : [value: 子选项,如["微辣"]]
|
||||
*/
|
||||
@Nullable
|
||||
|
|
|
@ -18,7 +18,13 @@ public class Order {
|
|||
private String id;
|
||||
private String userId;
|
||||
private String shopId;
|
||||
/**
|
||||
* 订单项
|
||||
*/
|
||||
private List<OrderItem> items;
|
||||
/**
|
||||
* 总价(分)
|
||||
*/
|
||||
private Integer price;
|
||||
/**
|
||||
* - 0 已取消
|
||||
|
@ -26,6 +32,9 @@ public class Order {
|
|||
* - 2 已完成
|
||||
*/
|
||||
private Integer status;
|
||||
/**
|
||||
* 送餐地址
|
||||
*/
|
||||
private String address;
|
||||
/**
|
||||
* Unix 时间戳
|
||||
|
|
|
@ -10,7 +10,7 @@ import java.util.Map;
|
|||
/**
|
||||
* @author spyn
|
||||
* @date 2024/7/10
|
||||
* @description
|
||||
* @description 订单内的子项
|
||||
*/
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
|
@ -20,9 +20,13 @@ public class OrderItem {
|
|||
@Nullable
|
||||
private Dish dish;
|
||||
private String orderId;
|
||||
/**
|
||||
* 购买份数
|
||||
*/
|
||||
private Integer count;
|
||||
private Integer price;
|
||||
/**
|
||||
* 子选项
|
||||
* [key: 类型,如“辣度选择”] : [value: 子选项,如"微辣"]
|
||||
* 注意这里value是String,而不是String[],和Dish中的subOptions不同
|
||||
*/
|
||||
|
|
|
@ -19,7 +19,13 @@ import java.util.Map;
|
|||
public class Shop {
|
||||
private String id;
|
||||
private String name;
|
||||
/**
|
||||
* 评分(暂且不做评论系统,这里写死)
|
||||
*/
|
||||
private Float point;
|
||||
/**
|
||||
* 销量
|
||||
*/
|
||||
private Integer sellCount;
|
||||
/**
|
||||
* - 0 被删除
|
||||
|
@ -28,16 +34,26 @@ public class Shop {
|
|||
*/
|
||||
private Integer status;
|
||||
/**
|
||||
* 格式为HH:mm:ss
|
||||
* 开店和闭店时间,格式为HH:mm:ss
|
||||
*/
|
||||
private String openTime;
|
||||
private String closeTime;
|
||||
/**
|
||||
* 店铺地址(字符串)
|
||||
*/
|
||||
private String address;
|
||||
/**
|
||||
* APP首页展示的菜品(最多3份)
|
||||
*/
|
||||
@Nullable
|
||||
private List<Dish> displayedDishes;
|
||||
/**
|
||||
* 店铺的icon
|
||||
*/
|
||||
@Nullable
|
||||
private String image;
|
||||
/**
|
||||
* 菜品分类
|
||||
* [key: 分类名] : [value: 菜品列表]
|
||||
*/
|
||||
@Nullable
|
||||
|
|
|
@ -15,6 +15,9 @@ import lombok.NoArgsConstructor;
|
|||
public class ShoppingCart {
|
||||
// 不需要用户ID,用户信息从token中获取
|
||||
private String shopId;
|
||||
/**
|
||||
* 订单子项
|
||||
*/
|
||||
private ShoppingCartItem[] dishes;
|
||||
// 用户地址,用户可能会修改地址,故以该字段为准
|
||||
private String address;
|
||||
|
|
|
@ -16,8 +16,12 @@ import java.util.Map;
|
|||
@NoArgsConstructor
|
||||
public class ShoppingCartItem {
|
||||
private String dishId;
|
||||
/**
|
||||
* 份数
|
||||
*/
|
||||
private Integer count;
|
||||
/**
|
||||
* 子选项
|
||||
* [key: 类型,如“辣度选择”] : [value: 子选项,如"微辣"]
|
||||
* 注意这里value是String,而不是String[],和Dish中的subOptions不同
|
||||
*/
|
||||
|
|
Loading…
Reference in New Issue