package com.qmth.distributed.print.business.bean.params;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.qmth.distributed.print.business.bean.dto.CourseWeightDto;
import io.swagger.annotations.ApiModelProperty;
import org.hibernate.validator.constraints.Range;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.util.List;

/**
 * @Description: 课程权重设置参数
 * @Author: CaoZixuan
 * @Date: 2024-03-01
 */
public class CourseWeightParam {

    @ApiModelProperty("教学课程id")
    @JsonSerialize(using = ToStringSerializer.class)
    @NotNull(message = "缺少教学课程")
    @Range(min = 1L, message = "缺少教学课程")
    private Long teachCourseId;

    @ApiModelProperty("默认占比")
    private BigDecimal defaultRate;

    @ApiModelProperty("自定义占比")
    private BigDecimal customRate;

    @ApiModelProperty("课程权重表单")
    @NotEmpty(message = "缺少权重设置表单")
    private List<CourseWeightDto> submitForm;

    public Long getTeachCourseId() {
        return teachCourseId;
    }

    public void setTeachCourseId(Long teachCourseId) {
        this.teachCourseId = teachCourseId;
    }

    public BigDecimal getDefaultRate() {
        return defaultRate;
    }

    public void setDefaultRate(BigDecimal defaultRate) {
        this.defaultRate = defaultRate;
    }

    public BigDecimal getCustomRate() {
        return customRate;
    }

    public void setCustomRate(BigDecimal customRate) {
        this.customRate = customRate;
    }

    public List<CourseWeightDto> getSubmitForm() {
        return submitForm;
    }

    public void setSubmitForm(List<CourseWeightDto> submitForm) {
        this.submitForm = submitForm;
    }
}
