package org.jeecg.modules.app.dto;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
import org.jeecg.modules.app.vo.AppGameScheduleVO;
import org.jeecg.modules.system.app.entity.AppCourses;
import org.jeecg.modules.system.app.entity.AppOrderProInfo;
import org.jeecg.modules.system.app.entity.InsureOrderInfo;
import org.jeecg.modules.system.app.vo.AppOrderProInfoVO;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

@Data
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@AllArgsConstructor
@NoArgsConstructor
@Schema(description = "订单详情响应对象")
public class AppOrderInfoDTO implements Serializable {
    private static final long serialVersionUID = 1L;

    @Schema(description = "订单ID")
    private String id;

    @Schema(description = "订单号")
    private String orderCode;

    @Schema(description = "订单状态")
    private Integer orderStatus;

    @Schema(description = "订单类型")
    private Integer type;

    @Schema(description = "订单类型")
    private Integer orderType;

    @JsonFormat(timezone = "GMT+8",shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Schema(description = "下单时间")
    private Date createTime;

    @JsonFormat(timezone = "GMT+8",shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Schema(description = "付款时间")
    private Date payTime;

    @Schema(description = "门店名称")
    private String siteName;

    @Schema(description = "经营状态 0-营业 1-休息")
    private Integer runStatus;

    @Schema(description = "经营类型0全天 1自定义")
    private Integer runType;

    @Schema(description = "上课地址ID")
    private String addressSiteId;

    @Schema(description = "上课地址")
    private String courseSiteAddress;

    @Schema(description = "学校地址")
    private String schoolAddress;

    @Schema(description = "是否学校课程 0-否 1-是")
    private Integer orSchoolCourse;

    @Schema(description = "日期")
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date dateOfSale;

    @Excel(name = "开始时间", width = 20, format = "HH:mm")
    @JsonFormat(timezone = "GMT+8",pattern = "HH:mm")
    @DateTimeFormat(pattern="HH:mm")
    @Schema(description = "开始时间")
    private Date startTime;

    @Excel(name = "结束时间", width = 20, format = "HH:mm")
    @JsonFormat(timezone = "GMT+8",pattern = "HH:mm")
    @DateTimeFormat(pattern="HH:mm")
    @Schema(description = "结束时间")
    private Date endTime;

    @Excel(name = "开始时间", width = 20, format = "yyyy-MM-dd")
    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern="yyyy-MM-dd")
    @Schema(description = "开始时间")
    private Date gameStartTime;

    @Excel(name = "结束时间", width = 20, format = "yyyy-MM-dd")
    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern="yyyy-MM-dd")
    @Schema(description = "结束时间")
    private Date gameEndTime;

    @Schema(description = "用户")
    private String userNames;

    @Schema(description = "退款类型;0可退/到期自动退 1限时退 2不可退")
    private Integer refundType;

    @Schema(description = "体育馆包场提前退款时间；单位：分钟")
    private Integer earlyRefundTime;

    @Schema(description = "赛事地址")
    private String gameAddress;

    @Schema(description = "纬度")
    private BigDecimal latitude;

    @Schema(description = "经度")
    private BigDecimal longitude;

    @Schema(description = "客服电话")
    private String phone;

    @Schema(description = "买家电话")
    private String phoneNumber;

    @Schema(description = "商品数量")
    private Integer amount;

    @Schema(description = "商品总额")
    private BigDecimal totalPrice;

    @Schema(description = "试听优惠金额")
    private BigDecimal sDiscounts;

    @Schema(description = "团购优惠金额")
    private BigDecimal tDiscounts;

    @Schema(description = "实际付款")
    private BigDecimal price;

    @Schema(description = "订单信息")
    private List<AppOrderProInfoVO> proInfoList;

    @Schema(description = "赛事安排")
    private List<AppGameScheduleVO> appGameScheduleVOList;

    @Schema(description = "保单信息")
    private List<InsureOrderInfo> insureOrderInfoList;

    @Schema(description = "赛程数")
    private Integer gameScheduleNum;

    @Schema(description = "是否评论（0-否 1-是）")
    private Integer orEvaluate;

    //商品信息
    @Schema(description = "商品信息")
    private AppCourses appCourses;

    //使用须知
    @Schema(description = "提示/须知")
    private String reminder;

    @Schema(description = "预约：0否 1是")
    private Integer orSubscribe;
    //提前预约时间：0免预约 单位：时
    @Schema(description = "提前预约时间：0免预约 单位：时")
    private Integer advanceTime;
    @Schema(description = "参赛资质")
    private String gameCertification;
}
