package com.yonge.cooleshow.biz.dal.dto.search;

import com.yonge.cooleshow.biz.dal.enums.ClientEnum;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import javax.validation.constraints.NotNull;
import java.util.List;
import java.util.Optional;

/**
 * Description 专辑详情下的曲目查询
 *
 * @author liujunchi
 * @date 2022-03-31
 */
@ApiModel(value = "MusicAlbumDetailSearch", description = "专辑详情查询")
public class MusicAlbumDetailSearch extends MusicSheetSearch {

    @NotNull(message = "专辑编号ID不能为空")
    @ApiModelProperty(value = "专辑编号ID",required = true)
    private Long id;

    /**
     * 1：新增曲目，2：已有曲目
     */
    @ApiModelProperty(hidden = true,value = "1：新增曲目，2：已有曲目")
    private Integer type;

    @ApiModelProperty(value = "假删除 0 : 未删除 1：已删除",hidden = true)
    private Boolean delFlag = false;

    @ApiModelProperty("相关专辑数，默认4")
    private Integer relatedNum = 4;

    @ApiModelProperty("客户端类型")
    private ClientEnum clientType;

    @ApiModelProperty(value = "艺术家")
    private String composer;  //音乐家

    private List<String> paymentTypes;

    public Integer getRelatedNum() {
        return relatedNum;
    }

    public void setRelatedNum(Integer relatedNum) {
        this.relatedNum = relatedNum;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    public ClientEnum getClientType() {
        return Optional.ofNullable(clientType).orElse(ClientEnum.STUDENT);
    }

    public void setClientType(ClientEnum clientType) {
        this.clientType = clientType;
    }

    public String getComposer() {
        return composer;
    }

    public void setComposer(String composer) {
        this.composer = composer;
    }

    @Override
    public Boolean getDelFlag() {
        return delFlag;
    }

    @Override
    public void setDelFlag(Boolean delFlag) {
        this.delFlag = delFlag;
    }

    public List<String> getPaymentTypes() {
        return paymentTypes;
    }

    public void setPaymentTypes(List<String> paymentTypes) {
        this.paymentTypes = paymentTypes;
    }
}
