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