package com.ym.mec.biz.dal.entity;

import org.apache.commons.lang3.builder.ToStringBuilder;

import com.ym.mec.biz.dal.enums.GroupType;

import io.swagger.annotations.ApiModelProperty;

import java.math.BigDecimal;

/**
 * 对应数据库表(course_schedule_student_payment):
 */
public class CourseScheduleStudentPayment implements Comparable<CourseScheduleStudentPayment> {

	/**  */
	private Long id;
	
	private GroupType groupType;
	
	/**  */
	@ApiModelProperty(value = "乐团编号",required = false)
	private String musicGroupId;
	
	/**  */
	private Long courseScheduleId;
	
	private CourseSchedule courseSchedule;
	
	/**  */
	private Integer userId;

	private BigDecimal originalPrice;
	
	/** 预计价格 */
	private java.math.BigDecimal expectPrice;
	
	/**  */
	private java.math.BigDecimal actualPrice;
	
	/**  */
	private java.util.Date createTime;
	
	/**  */
	private java.util.Date updateTime;
	
	/** 结算时间 */
	private java.util.Date settlementTime;
	
	private Integer classGroupId;

	private String batchNo;

	private String openPlayMidi;

	private String examSongDownloadJson;

	public CourseScheduleStudentPayment() {
	}

	public CourseScheduleStudentPayment(Long courseScheduleId, Integer userId, BigDecimal expectPrice, Integer classGroupId) {
		this.courseScheduleId = courseScheduleId;
		this.userId = userId;
		this.expectPrice = expectPrice;
		this.classGroupId = classGroupId;
	}

	public CourseScheduleStudentPayment(Long id, Long courseScheduleId) {
		this.id = id;
		this.courseScheduleId = courseScheduleId;
	}

	public String getExamSongDownloadJson() {
		return examSongDownloadJson;
	}

	public void setExamSongDownloadJson(String examSongDownloadJson) {
		this.examSongDownloadJson = examSongDownloadJson;
	}

	public String getOpenPlayMidi() {
		return openPlayMidi;
	}

	public void setOpenPlayMidi(String openPlayMidi) {
		this.openPlayMidi = openPlayMidi;
	}

	public void setId(Long id){
		this.id = id;
	}
	
	public Long getId(){
		return this.id;
	}
			
	public GroupType getGroupType() {
		return groupType;
	}

	public void setGroupType(GroupType groupType) {
		this.groupType = groupType;
	}

	public String getMusicGroupId() {
		return musicGroupId;
	}

	public void setMusicGroupId(String musicGroupId) {
		this.musicGroupId = musicGroupId;
	}

	public void setCourseScheduleId(Long courseScheduleId){
		this.courseScheduleId = courseScheduleId;
	}
	
	public Long getCourseScheduleId(){
		return this.courseScheduleId;
	}
			
	public void setUserId(Integer userId){
		this.userId = userId;
	}
	
	public Integer getUserId(){
		return this.userId;
	}

	public BigDecimal getOriginalPrice() {
		return originalPrice;
	}

	public void setOriginalPrice(BigDecimal originalPrice) {
		this.originalPrice = originalPrice;
	}

	public void setExpectPrice(java.math.BigDecimal expectPrice){
		this.expectPrice = expectPrice;
	}
	
	public java.math.BigDecimal getExpectPrice(){
		return this.expectPrice;
	}
			
	public void setActualPrice(java.math.BigDecimal actualPrice){
		this.actualPrice = actualPrice;
	}
	
	public java.math.BigDecimal getActualPrice(){
		return this.actualPrice;
	}
			
	public void setCreateTime(java.util.Date createTime){
		this.createTime = createTime;
	}
	
	public java.util.Date getCreateTime(){
		return this.createTime;
	}
			
	public void setUpdateTime(java.util.Date updateTime){
		this.updateTime = updateTime;
	}
	
	public java.util.Date getUpdateTime(){
		return this.updateTime;
	}
			
	public void setSettlementTime(java.util.Date settlementTime){
		this.settlementTime = settlementTime;
	}
	
	public java.util.Date getSettlementTime(){
		return this.settlementTime;
	}
			
	public Integer getClassGroupId() {
		return classGroupId;
	}

	public void setClassGroupId(Integer classGroupId) {
		this.classGroupId = classGroupId;
	}

	public String getBatchNo() {
		return batchNo;
	}

	public void setBatchNo(String batchNo) {
		this.batchNo = batchNo;
	}

	public CourseSchedule getCourseSchedule() {
		return courseSchedule;
	}

	public void setCourseSchedule(CourseSchedule courseSchedule) {
		this.courseSchedule = courseSchedule;
	}

	@Override
	public String toString() {
		return ToStringBuilder.reflectionToString(this);
	}

	@Override
	public int compareTo(CourseScheduleStudentPayment cssp) {
		if(courseSchedule != null){
			int r = courseSchedule.getClassDate().compareTo(cssp.getCourseSchedule().getClassDate());
			if(r == 0){
				return courseSchedule.getStartClassTime().compareTo(cssp.getCourseSchedule().getStartClassTime());
			}
			return r;
		}
		return 0;
	}

}
