package com.yc.ship.module.ota.api.dto;


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

import javax.validation.Valid;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.List;

/**
 * @author le'yang
 */
@Schema(description = "管理后台 - 平台产品与分销商关系 Response VO")
@Data
public class DistributorProductRespDTO {

    @Schema(description = "主键ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "24875")
    private String id;

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

    @Schema(description = "产品ID", example = "22107")
    private Long productId;

    @Schema(description = "产品名称", example = "22107")
    private String productName;

    @Schema(description = "产品skuID", example = "21389")
    private Long productSkuId;
    @Schema(description = "类型  1：游船 2：附加产品 3：赠票", example = "21389")
    private Long routePlanId;

    @Schema(description = "成本价", example = "14419")
    private BigDecimal costPrice;

    @Schema(description = "销售价", example = "18903")
    private BigDecimal salePrice;

    @Schema(description = "规格类型;common通用 full全价 half半价 free免票", example = "")
    private String specType;

    @Schema(description = "库存")
    private Integer stock;

    @Schema(description = "是否启用")
    private Integer isUse;

    @Schema(description = "创建时间")
    private LocalDateTime createTime;

    @Schema(description = "租户id")
    private Long tenantId;

    @Schema(description = "分销商产品子票列表")
    private List<DistributorProjectDTO> distributorProjectList;

    @Schema(description = "旅行社的产品价格")
    private List<DistributorAgencyPriceDTO> distributorAgencyPriceList;


    @Schema(description = "分销商产品子票信息")
    @Data
    @Valid
    public static class DistributorProjectDTO{

        @Schema(description = "ID", example = "")
        private Long id;

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

        @Schema(description = "分销产品ID", example = "")
        private String distributorProductId;

        @Schema(description = "产品ID", example = "")
        private Long productId;

        @Schema(description = "基础产品ID", example = "")
        private Long productBaseId;

        @Schema(description = "规格ID", example = "")
        private Long specificationId;

        @Schema(description = "规格类型;common通用 full全价 half半价 free免票", example = "")
        private String specType;
    }
}
