package com.yc.ship.module.product.controller.admin.voyage.vo;

import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
import com.yc.ship.framework.excel.core.annotations.DictFormat;
import com.yc.ship.framework.excel.core.convert.DictConvert;
import com.yc.ship.module.resource.api.route.dto.RouteRespDTO;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.List;

@Schema(description = "管理后台 - 航次管理 Response VO")
@Data
@ExcelIgnoreUnannotated
public class VoyageRespVO {

    @Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "22359")
    @ExcelProperty("ID")
    private Long id;

    @Schema(description = "航次名称", example = "李四")
    @ExcelProperty("航次名称")
    private String name;

    @Schema(description = "基础价格")
    private BigDecimal basicPrice;


    @Schema(description = "航次名称-带航向")
    private String fname;

    @Schema(description = "航次代码")
    @ExcelProperty("航次代码")
    private String code;

    @Schema(description = "游轮", example = "6699")
    @ExcelProperty("游轮")
    private Long shipId;

    @Schema(description = "航线", example = "4445")
    @ExcelProperty("航线")
    private Long routeId;

    @Schema(description = "航线对象")
    private RouteRespDTO routeResp;

    @Schema(description = "登船时间")
    @ExcelProperty("登船时间")
    private LocalDateTime boardingTime;

    @Schema(description = "开航时间")
    @ExcelProperty("开航时间")
    private LocalDateTime startTime;

    @Schema(description = "离船时间")
    @ExcelProperty("离船时间")
    private LocalDateTime leaveTime;

    @Schema(description = "航次类别", example = "1")
    @ExcelProperty(value = "航次类别", converter = DictConvert.class)
    @DictFormat("voyage_type") // TODO 代码优化：建议设置到对应的 DictTypeConstants 枚举类中
    private Integer type;

    @Schema(description = "是否中转")
    @ExcelProperty(value = "是否中转", converter = DictConvert.class)
    @DictFormat("yes_no") // TODO 代码优化：建议设置到对应的 DictTypeConstants 枚举类中
    private Integer transfer;

    @Schema(description = "中转时间")
    @ExcelProperty("中转时间")
    private LocalDateTime transferTime;

    @Schema(description = "登船码头", example = "1357")
    @ExcelProperty("登船码头")
    private Long boardingDockId;

    @Schema(description = "登船地点")
    @ExcelProperty("登船地点")
    private String boardingAddress;

    @Schema(description = "离船地点")
    @ExcelProperty("离船地点")

    private String leaveAddress;

    @Schema(description = "预定渠道")
    @ExcelProperty(value = "预定渠道", converter = DictConvert.class)
    @DictFormat("product_reserve_channel") // TODO 代码优化：建议设置到对应的 DictTypeConstants 枚举类中
    private List<Integer> channel;

    @Schema(description = "库存是否可见")
    @ExcelProperty(value = "库存是否可见", converter = DictConvert.class)
    @DictFormat("yes_no") // TODO 代码优化：建议设置到对应的 DictTypeConstants 枚举类中
    private Integer stockVisible;

    @Schema(description = "上架状态", example = "1")
    @ExcelProperty(value = "上架状态", converter = DictConvert.class)
    @DictFormat("product_shelf_status") // TODO 代码优化：建议设置到对应的 DictTypeConstants 枚举类中
    private Integer shelfStatus;

    @Schema(description = "集合地点")
    @ExcelProperty("集合地点")
    private String venue;

    @Schema(description = "产品介绍")
    @ExcelProperty("产品介绍")
    private String introduce;

    @Schema(description = "登船须知")
    @ExcelProperty("登船须知")
    private String notice;

    @Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
    @ExcelProperty("创建时间")
    private LocalDateTime createTime;

    @Schema(description = "船名")
    private String shipName;

    @Schema(description = "船名简称")
    private String shortShipName;

    @Schema(description = "线路名称")
    private String routeName;

    /**
     * 预订须知
     */
    @Schema(description = "预订须知")
    private String bookingNotice;

    /**
     * 登船须知
     */
    @Schema(description = "登船须知")
    private String boardingNotice;

    /**
     * 儿童预定说明
     */
    @Schema(description = "儿童预定说明")
    private String childBookingNotice;

    @Schema(description = "航次方向")
    private Integer direction;

    private Integer isLock;

    /**
     * 预定人数
     */
    @Schema(description = "预定人数")
    private Integer bookingCount;
}