package com.yonge.cooleshow.biz.dal.vo;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import java.io.Serializable;
import java.util.Date;
import java.util.Objects;
import java.util.Optional;

/**
 * @Author: cy
 * @Date: 2022/4/18
 */
@ApiModel(value = "CourseStudent")
public class CourseStudent implements Serializable {
    @ApiModelProperty(value = "课程id")
    private Integer courseId;

    @ApiModelProperty(value = "课程组id")
    private Integer courseGoupId;

    @ApiModelProperty(value = "上课日期")
    private Date classDate;

    @ApiModelProperty(value = "上课时间")
    private Date startTime;

    @ApiModelProperty(value = "下课时间")
    private Date endTime;

    @ApiModelProperty(value = "课程状态(NOT_START:未开始 ING:进行中 COMPLETE:已完成 CANCEL:已取消)")
    private String status;

    @ApiModelProperty(value = "课程类型(LIVE:直播课 PRACTICE:陪练课 PIANO_ROOM_CLASS:琴房课")
    private String courseType;

    @ApiModelProperty(value = "用户id")
    private String userId;

    @ApiModelProperty(value = "陪练课:用户名,直播课:课程名")
    private String name;

    private String realName;

    @ApiModelProperty(value = "陪练课:用户头像,直播课:直播背景图")
    private String cover;

    @ApiModelProperty(value = "直播课购课人数")
    private String payCount;

    @ApiModelProperty(value = "声部id")
    private Integer subjectId;

    @ApiModelProperty(value = "声部名称")
    private String subjectName;

    @ApiModelProperty(value = "头像")
    private String avatar;

    @ApiModelProperty(value = "直播课成课后生成的im群id")
    private String imGroupId;

    @ApiModelProperty(value = "学生评价 0:未评价 1:已评价")
    private Integer studentReplied;

    @ApiModelProperty(value = "老师评价 0:未评价 1:已评价")
    private Integer teacherReplied;

    @ApiModelProperty(value = "课程名称")
    private String courseName;

    public Integer getStudentReplied() {
        return studentReplied;
    }

    public void setStudentReplied(Integer studentReplied) {
        this.studentReplied = studentReplied;
    }

    public Integer getTeacherReplied() {
        return teacherReplied;
    }

    public void setTeacherReplied(Integer teacherReplied) {
        this.teacherReplied = teacherReplied;
    }

    public String getRealName() {
        return realName;
    }

    public void setRealName(String realName) {
        this.realName = realName;
    }

    public Integer getCourseId() {
        return courseId;
    }

    public void setCourseId(Integer courseId) {
        this.courseId = courseId;
    }

    public Integer getCourseGoupId() {
        return courseGoupId;
    }

    public void setCourseGoupId(Integer courseGoupId) {
        this.courseGoupId = courseGoupId;
    }

    public Date getClassDate() {
        return classDate;
    }

    public void setClassDate(Date classDate) {
        this.classDate = classDate;
    }

    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 String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public String getCourseType() {
        return courseType;
    }

    public void setCourseType(String courseType) {
        this.courseType = courseType;
    }

    public String getUserId() {
        return userId;
    }

    public void setUserId(String userId) {
        this.userId = userId;
    }

    public String getName() {

        return Optional.ofNullable(name).orElse(getCourseName());
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getCover() {
        return cover;
    }

    public void setCover(String cover) {
        this.cover = cover;
    }

    public String getPayCount() {
        return payCount;
    }

    public void setPayCount(String payCount) {
        this.payCount = payCount;
    }

    public Integer getSubjectId() {
        return subjectId;
    }

    public void setSubjectId(Integer subjectId) {
        this.subjectId = subjectId;
    }

    public String getSubjectName() {
        return subjectName;
    }

    public void setSubjectName(String subjectName) {
        this.subjectName = subjectName;
    }

    public String getAvatar() {
        return avatar;
    }

    public void setAvatar(String avatar) {
        this.avatar = avatar;
    }

    public String getImGroupId() {
        return imGroupId;
    }

    public void setImGroupId(String imGroupId) {
        this.imGroupId = imGroupId;
    }

    public String getCourseName() {
        return courseName;
    }

    public void setCourseName(String courseName) {
        this.courseName = courseName;
    }
}

