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

import com.fasterxml.jackson.annotation.JsonFormat;
import com.yonge.cooleshow.common.enums.YesOrNoEnum;
import com.yonge.toolset.base.page.QueryInfo;
import com.yonge.toolset.base.util.StringUtil;
import io.swagger.annotations.ApiModelProperty;
import org.apache.commons.lang.StringUtils;
import org.springframework.format.annotation.DateTimeFormat;

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

/**
 * Description  平台 学生管理 学员详情 乐谱
 *
 * @author liujunchi
 * @date 2022-04-02
 */
public class StudentMusicSheetOrderSearch extends QueryInfo {

    @ApiModelProperty(value = "学生id", required = true)
    @NotNull(message = "学生编号不能为空")
    private Long studentId;

    @ApiModelProperty("曲目编号/名称")
    private String idAndName;

    @ApiModelProperty("订单号")
    private String orderNo;

    @ApiModelProperty("曲目标签id，多个逗号隔开")
    private String musicTagIds;

    @ApiModelProperty(hidden = true)
    private List<Long> musicTagList;

    @ApiModelProperty(value = "购买开始时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date startTime;

    @ApiModelProperty(value = "购买结束时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date endTime;

    @ApiModelProperty(value = "订单状态 WAIT_PAY 待支付 PAYING 支付中  PAID 已付款 CLOSE 已关闭", hidden = true)
    private YesOrNoEnum orderStatus = YesOrNoEnum.YES;

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

    public Long getStudentId() {
        return studentId;
    }

    public void setStudentId(Long studentId) {
        this.studentId = studentId;
    }

    public String getIdAndName() {
        return idAndName;
    }

    public void setIdAndName(String idAndName) {
        this.idAndName = idAndName;
    }

    public String getOrderNo() {
        return orderNo;
    }

    public void setOrderNo(String orderNo) {
        this.orderNo = orderNo;
    }

    public String getMusicTagIds() {
        return musicTagIds;
    }

    public void setMusicTagIds(String musicTagIds) {
        this.musicTagIds = musicTagIds;
        if (StringUtils.isNotBlank(musicTagIds)) {
            this.musicTagList = StringUtil.toLongList(musicTagIds);
        }
    }

    public Date getStartTime() {
        return startTime;
    }

    public void setStartTime(Date startTime) {
        this.startTime = startTime;
    }

    public Date getEndTime() {
        return endTime;
    }

    public void setEndTime(Date endTime) {
        this.endTime = endTime;
    }

    public List<Long> getMusicTagList() {
        return musicTagList;
    }

    public void setMusicTagList(List<Long> musicTagList) {
        this.musicTagList = musicTagList;
    }

    public Boolean getDelFlag() {
        return delFlag;
    }

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

    public YesOrNoEnum getOrderStatus() {
        return orderStatus;
    }

    public void setOrderStatus(YesOrNoEnum orderStatus) {
        this.orderStatus = orderStatus;
    }
}
