package org.jeecg.modules.app.vo;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

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

@Data
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@Schema(description="全局搜索信息返回参数")
public class SearchVO{
    @Schema(description="全局搜索场地分页返回参数")
    private List<SearchPlaceVO> searchPlaceList;
    @Schema(description="全局搜索培训分页返回参数")
    private List<SearchTrainVO> searchTrainVOList;
    @Schema(description="全局搜索赛事分页返回参数")
    private List<SearchRaceVO> searchRaceVOList;
    @Schema(description="全局搜索教练分页返回参数")
    private List<SearchInstructorVO> searchInstructorVOList;

    @Data
    @Accessors(chain = true)
    @EqualsAndHashCode(callSuper = false)
    @Schema(description="全局搜索教练分页返回参数")
    public static class SearchInstructorVO {
        @Schema(description = "主键id")
        private String id;
        @Schema(description = "教练名称")
        private String name;
        @Schema(description = "教练头像")
        private String avatar;
        @Schema(description = "所属部门名称")
        private String orgName;
        @Schema(description = "擅长说明")
        private String excelMsg;
        @Schema(description = "km")
        private double km;
        @Schema(hidden = true)
        private String orgCode;
        @Schema(description = "教学理念")
        private String teachingPhilosophy;
        @Schema(description = "好评率")
        private String goodRate;
        @Schema(description = "订单数")
        private String orderCount;
        @Schema(description = "培训项目")
        private String trainingPrograms;
        @Schema(description = "授课人数")
        private String classesNumber;
        @Schema(description = "课程列表ID")
        private String categoryId;
        @Schema(hidden = true)
        private String userId;
        @Schema(description = "课程列表")
        private List<SearchCoursesVO> courseList;
        private List<String> list;
    }
    @Data
    @Accessors(chain = true)
    @EqualsAndHashCode(callSuper = false)
    @Schema(description="课程信息返回参数")
    public static class CourseInfoVO {
        @Schema(description = "主键id")
        private String id;
        @Schema(description = "课程名称")
        private String name;
        @Schema(description = "课程价格")
        private String sellingPrice;
        @Schema(description = "年售")
        private String  sales;

    }

    @Data
    @Accessors(chain = true)
    @EqualsAndHashCode(callSuper = false)
    @Schema(description="全局搜索赛事分页返回参数")
    public static class SearchRaceVO{
        @Schema(description = "主键id")
        private String id;
        @Schema(description = "名称")
        private String name;
        @Schema(description = "门店名称")
        private String placeName;
        @Schema(description = "课程售价")
        private BigDecimal sellingPrice;
        @Schema(description = "图片")
        private String cover;
        @Schema(description = "比赛类型；0个人、1团队、2混合")
        private int type;
        @Schema(hidden = true)
        private String orgCode;
        private int siteType;
        private String siteId;
        private BigDecimal latitude;
        private BigDecimal longitude;
        @Schema(description = "类目")
        private String categoryId;
        private List<String> category;
        @Schema(description = "开始时间")
        private java.util.Date startTime;
        @Schema(description = "结束时间")
        private java.util.Date endTime;
        @Schema(description = "距离(KM)")
        private double km;
        @Schema(description = "赛事是否结束")
        private boolean registrationOpen;
    }

    @Data
    @Accessors(chain = true)
    @EqualsAndHashCode(callSuper = false)
    @Schema(description="全局搜索培训分页返回参数")
    public static class SearchTrainVO extends PlaceVO{
        @Schema(description = "id")
        private String id;
        @Schema(description = "名称")
        private String name;
        @Schema(description = "课程类型")
        private int priceType;
        @Schema(description = "课程介绍")
        private String reminder;
        @Schema(description = "课程原价")
        private BigDecimal originalPrice;
        @Schema(description = "课程售价")
        private BigDecimal sellingPrice;
        @Schema(description = "销售数量")
        private int sales;
        @Schema(description = "图片")
        private String cover;
        @Schema(description = "好评率")
        private BigDecimal goodRate;
        @Schema(description = "评论数")
        private long comments;
        @Schema(description = "退款类型")
        private int refundType;
        @Schema(description = "地址")
        private String address;
        @Schema(hidden = true)
        private String siteId;
        @Schema(description = "距离(KM)")
        private double km;
        @Schema(description = "课程开始时间")
        private Date startTime;
        @Schema(description = "课程结束时间")
        private Date endTime;
    }

    @Data
    @Accessors(chain = true)
    @EqualsAndHashCode(callSuper = false)
    @Schema(description="全局搜索场地分页返回参数")
    public static class SearchPlaceVO{
        @Schema(description = "id")
        private String id;
        @Schema(description = "场地名称")
        private String name;
        @Schema(description = "好评率")
        private BigDecimal goodRate;
        @Schema(description = "评论数")
        private String comments;
        @Schema(description = "地址")
        private String address;
        @Schema(description = "门店类型 0学校 1体育馆包场 ")
        private int type;
        @Schema(description = "图片")
        private String cover;
        @Schema(description = "距离(KM)")
        private double km;
        @Schema(description = "类目")
        private List<String> category;
        @Schema(hidden = true)
        private String categoryId;
        @Schema(description = "是否有票")
        private boolean ticketWhether;
        @Schema(description = "课程")
        private List<CourseInfoVO> course;
    }
    @Data
    @Accessors(chain = true)
    @EqualsAndHashCode(callSuper = false)
    @Schema(description="全局搜索产品信息返回参数")
    public static class SearchCoursesVO{
        @Schema(description = "id")
        private String id;
        @Schema(description = "名称")
        private String name;
        @Schema(description = "原价")
        private BigDecimal originalPrice;
        @Schema(description = "售价")
        private BigDecimal sellingPrice;
        @Schema(description = "销售销量")
        private int sales;

    }

}
