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

import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler;
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 VoyageStockDistributeTotalRespVO {

   @Schema(description = "分销商类型-分销商-门店统计")
   List<TotalGroupByDistributorVO> totalGroupByDistributorList;

   @Schema(description = "房型楼层统计")
   List<TotalGroupByRoomModelFloorVO> totalGroupByRoomModelFloorList;




   @Data
   public static class TotalGroupByDistributorVO {
      @ExcelProperty("分销商类型")
      @Schema(description = "分销商类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
      private Integer distributorType;

      @ExcelProperty("分销商ID")
      @Schema(description = "分销商ID", example = "王五")
      private Long distributorId;


      @ExcelProperty("门店ID")
      @Schema(description = "门店ID", example = "5290")
      private Long storeId;

      @ExcelProperty("已分配房间总数")
      @Schema(description = "已分配房间总数")
      private BigDecimal num;

      @ExcelProperty("已分配房型房间总数")
      @Schema(description = "已分配房型房间总数")
      private BigDecimal roomModelNum;

      @ExcelProperty("已分配房间号")
      @Schema(description = "已分配房间号", example = "1,2,3")
      @TableField(typeHandler = JacksonTypeHandler.class)
      List<Integer> roomNums;

   }

   @Data
   public static class TotalGroupByRoomModelFloorVO {
      @ExcelProperty("房型ID")
      @Schema(description = "房型ID", example = "30594")
      private Long roomModelId;

      @ExcelProperty("楼层号")
      @Schema(description = "楼层号")
      private Integer floor;

      @ExcelProperty("已分配房间数")
      private BigDecimal num;

   }
}