package com.yida.data.mall.dto.h5;

import com.yida.data.common.core.enums.PayWay;
import com.yida.data.common.core.enums.UnionPayTypeEnum;
import com.yida.data.common.core.enums.WxPayTypeEnum;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

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

/**
 * 生成账单订单请求类
 *
 * @author ZYJ
 * @date 2022/3/31
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@ApiModel(value = "CreateBillOrderDTO", description = "生成账单订单请求类")
public class CreateBillOrderDTO implements Serializable {

    private static final long serialVersionUID = -1996912359946279380L;

    @ApiModelProperty("账单id")
    private Long billId;

    @ApiModelProperty("学生id")
    private Long studentId;

    /**
     * 支付方式
     * {@link PayWay}
     */
    @ApiModelProperty("支付方式")
    private String payWay;

    /**
     * 支付类型
     * 银联云闪付: {@link UnionPayTypeEnum}
     * 微信类型: {@link WxPayTypeEnum}
     */
    @ApiModelProperty("支付类型")
    private Integer payType;

    @ApiModelProperty("项目集合")
    private List<CreateBillOrderItemDTO> itemList;

    @Data
    public static class CreateBillOrderItemDTO implements Serializable {

        private static final long serialVersionUID = 1658815990117029656L;

        @ApiModelProperty("项目id")
        private Long itemId;

        @ApiModelProperty("不定费项时的自定义金额")
        private BigDecimal itemPrice;

        @ApiModelProperty("对应选项集合")
        private List<CreateBillOrderSubItemDTO> subItemList;
    }

    @Data
    public static class CreateBillOrderSubItemDTO implements Serializable {

        private static final long serialVersionUID = -7926112558341478213L;

        @ApiModelProperty("项目选项id")
        private Long subItemId;
    }
}