package com.ssj.bean.course.domain;

import com.ssj.bean.common.framework.core.domain.BaseEntity;

import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Transient;
import java.math.BigDecimal;
import java.util.Date;

@Entity
@Table(name="tb_course_series")
public class CourseSeries extends BaseEntity {

	private static final long serialVersionUID = 1L;
	/**
	 * 课程名称
	 */
	private String courseName;
	/**
	 * 课程对象
	 */
	private String courseTarget;
	/**
	 * 班级人数
	 */
	private String classPnum;
	/**
	 * 课程时数
	 */
	private String coursePlan;
	
	/**
	 * 课程内容
	 */
	private String courseContent;
	
	/**
	 * 课程简介
	 */
	private String courseSummary;
	/**
	 * 推荐理由
	 */
	private String recommendReason;
	/**
	 * 老师要求
	 */
	private String teacherRequire;
	
	private String[] require;
	/**
	 * 官方价格
	 */
	private BigDecimal officialPrice;
	/**
	 * 课程类型标签 --：1语音类、2阅读类
	 */
	private Integer courseTypeLabel;
	/**
	 * 课程推荐标签   --1热门好课、2限时免费、3新课上线
	 */
	private String courseHotLable;
	/**
	 * 课程封面路径  -- 
	 */
	private String coverUrl;
	/**
	 * 创建时间
	 */
	private Date createTime;
	/**
	 * 最后更新时间
	 */
	private Date lastUpdateTime;
	/**
	 * 课程评分
	 */
	private Double score;
	
	/**
	 * 1--有效--2无效
	 */
	private Integer state;
	/**
	 * 课程个数
	 */
	private Integer courseSeriesDetailSize;
	
	private String teacherName;
	/**
	 * 中断率
	 */
	private String interruptRate;
	/**
	 * 学生实际个数
	 */
	private int studentNumber;
	
	
	private String color;
	
	public String getColor() {
		return color;
	}
	public void setColor(String color) {
		this.color = color;
	}
	public String getCourseName() {
		return courseName;
	}
	public void setCourseName(String courseName) {
		this.courseName = courseName;
	}
	public String getCourseTarget() {
		return courseTarget;
	}
	public void setCourseTarget(String courseTarget) {
		this.courseTarget = courseTarget;
	}
	public String getClassPnum() {
		return classPnum;
	}
	public void setClassPnum(String classPnum) {
		this.classPnum = classPnum;
	}
	public String getCoursePlan() {
		return coursePlan;
	}
	public void setCoursePlan(String coursePlan) {
		this.coursePlan = coursePlan;
	}
	public String getRecommendReason() {
		return recommendReason;
	}
	public void setRecommendReason(String recommendReason) {
		this.recommendReason = recommendReason;
	}
	public String getTeacherRequire() {
		return teacherRequire;
	}
	public void setTeacherRequire(String teacherRequire) {
		this.teacherRequire = teacherRequire;
	}
	public BigDecimal getOfficialPrice() {
		return officialPrice;
	}
	public void setOfficialPrice(BigDecimal officialPrice) {
		this.officialPrice = officialPrice;
	}
	public Integer getCourseTypeLabel() {
		return courseTypeLabel;
	}
	public void setCourseTypeLabel(Integer courseTypeLabel) {
		this.courseTypeLabel = courseTypeLabel;
	}
	public String getCourseHotLable() {
		return courseHotLable;
	}
	public void setCourseHotLable(String courseHotLable) {
		this.courseHotLable = courseHotLable;
	}
	public String getCoverUrl() {
		return coverUrl;
	}
	public void setCoverUrl(String coverUrl) {
		this.coverUrl = coverUrl;
	}
	public Date getCreateTime() {
		return createTime;
	}
	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}
	public Date getLastUpdateTime() {
		return lastUpdateTime;
	}
	public void setLastUpdateTime(Date lastUpdateTime) {
		this.lastUpdateTime = lastUpdateTime;
	}
	public Double getScore() {
		return score;
	}
	public void setScore(Double score) {
		this.score = score;
	}
	public Integer getState() {
		return state;
	}
	public void setState(Integer state) {
		this.state = state;
	}
	public String getCourseSummary() {
		return courseSummary;
	}
	public void setCourseSummary(String courseSummary) {
		this.courseSummary = courseSummary;
	}
	@Transient
	public Integer getCourseSeriesDetailSize() {
		return courseSeriesDetailSize;
	}
	public void setCourseSeriesDetailSize(Integer courseSeriesDetailSize) {
		this.courseSeriesDetailSize = courseSeriesDetailSize;
	}
	@Transient
	public String getTeacherName() {
		return teacherName;
	}
	public void setTeacherName(String teacherName) {
		this.teacherName = teacherName;
	}
	@Transient
	public String[] getRequire() {
		if(require!=null && require.length>0){
			return require;
		}
		if(teacherRequire!=null && teacherRequire.trim().length()>0){
			return teacherRequire.trim().split("；");
		}
		
		return null;
	}
	public void setRequire(String[] require) {
		this.require = require;
	}
	@Transient
	public String getInterruptRate() {
		return interruptRate;
	}
	public void setInterruptRate(String interruptRate) {
		this.interruptRate = interruptRate;
	}
	@Transient
	public int getStudentNumber() {
		return studentNumber;
	}
	public void setStudentNumber(int studentNumber) {
		this.studentNumber = studentNumber;
	}
	public String getCourseContent() {
		return courseContent;
	}
	public void setCourseContent(String courseContent) {
		this.courseContent = courseContent;
	}
  
	
	
	
}
