package shop.alien.store.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.math.BigDecimal;
import java.util.Date;

/**
 * 预订订单列表项（店铺名称、入口图、状态、预订信息，点击店铺名进入店铺详情）
 *
 * @author system
 */
@Data
@ApiModel(value = "ReservationOrderListVo", description = "预订订单列表项")
public class ReservationOrderListVo {

    @ApiModelProperty(value = "订单ID，点击进入订单详情")
    private Integer orderId;

    @ApiModelProperty(value = "订单编号")
    private String orderSn;

    @ApiModelProperty(value = "门店ID，点击店铺名进入店铺详情页")
    private Integer storeId;

    @ApiModelProperty(value = "经营板块ID（store_info.business_section）")
    private Integer businessSection;

    @ApiModelProperty(value = "店铺名称")
    private String storeName;

    @ApiModelProperty(value = "店铺入口图URL")
    private String storeEntranceImageUrl;

    @ApiModelProperty(value = "订单状态 0:待支付 1:待使用 2:已完成 3:已过期 4:已取消 5:已关闭 6:退款中 7:已退款")
    private Integer orderStatus;

    @ApiModelProperty(value = "支付状态 0:未支付 1:已支付 2:已退款 3:部分退款")
    private Integer paymentStatus;

    @ApiModelProperty(value = "状态文案：待支付/待使用/已完成/已过期/已取消/已关闭/退款中/已退款")
    private String statusText;

    @ApiModelProperty(value = "预订日期展示 如 01月01日(周三)")
    private String reservationDateText;

    @ApiModelProperty(value = "区域与人数 如 大厅 4人")
    private String guestAndCategoryText;

    @ApiModelProperty(value = "桌号 如 A01,A02")
    private String tableNumbersText;

    @ApiModelProperty(value = "就餐时间段 如 10:00-12:05")
    private String diningTimeSlotText;

    @ApiModelProperty(value = "预订金额（元），免费时为 null 或 0")
    private BigDecimal depositAmount;

    @ApiModelProperty(value = "核销码/券码")
    private String verificationCode;

    @ApiModelProperty(value = "商户订单号（传给支付宝/微信，用于查单、退款等）")
    private String outTradeNo;

    @ApiModelProperty(value = "支付方式/类型，如 wechatPay、alipay")
    private String payType;

    @ApiModelProperty(value = "商家取消原因（statusText 为「商家取消」时有值）")
    private String merchantCancelReason;

    @ApiModelProperty(value = "创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createdTime;

    // --------- 操作按钮（与详情页一致，便于列表展示操作） ---------
    @ApiModelProperty(value = "是否显示「继续支付」")
    private Boolean canContinuePay;

    @ApiModelProperty(value = "是否显示「取消预订」")
    private Boolean canCancelReservation;

    @ApiModelProperty(value = "是否显示「修改预订」")
    private Boolean canModifyReservation;

    @ApiModelProperty(value = "是否显示「查看券码」等（待使用时为 true）")
    private Boolean canViewVoucher;

    @ApiModelProperty(value = "是否显示「删除」")
    private Boolean canDelete;

    @ApiModelProperty(value = "是否显示「再次预订」")
    private Boolean canBookAgain;

    @ApiModelProperty(value = "订单费用类型 0-免费，1-收费")
    private Integer orderCostType;
}
