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

import java.math.BigDecimal;
import java.time.DayOfWeek;
import java.time.LocalDate;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;

import com.yonge.cooleshow.biz.dal.enums.DeviceTypeEnum;
import com.yonge.cooleshow.biz.dal.enums.FeatureType;
import com.yonge.cooleshow.biz.dal.enums.HeardLevelEnum;
import com.yonge.cooleshow.common.entity.BaseEntity;
import com.yonge.toolset.utils.date.DateUtil;

/**
 * 对应数据库表(sys_music_compare_record):
 */
@Data
public class SysMusicCompareRecord extends BaseEntity {

	/**  */
	private Long id;

	/** 行为编号 */
	private String behaviorId;
	
	/** 用户编号 */
	private Long userId;
	
	/** 教程编号 */
	private Long musicSheetId;

	private HeardLevelEnum heardLevel;

	private String sysMusicScoreName;
	
	/** 评分数据 */
	private String scoreData;

	private int notesDataIndex;


	// 自定义配置 默认空字符串
	private String customConfiguration ="";

	/** 总分 */
	private BigDecimal score;

	/** 音准 */
	private BigDecimal intonation;

	/** 节奏 */
	private BigDecimal cadence;

	/** 完成度 */
	private BigDecimal integrity;

	/** 录音文件地址 */
	private String recordFilePath;

	private String videoFilePath;

	/** 周一日期 */
	private String monday = LocalDate.now().with(DateUtil.weekFields.dayOfWeek(), DayOfWeek.MONDAY.getValue()).toString();

	private FeatureType feature;
	
	/** 创建时间 */
	private java.util.Date createTime;

	private DeviceTypeEnum deviceType;

	private float sourceTime = 0;

	private float playTime = 0;

	private int speed = 90;

	private String clientId;
	
	private String partIndex;

	@ApiModelProperty("音乐过期 0：否 1：是")
	private Integer expire;

	@ApiModelProperty("活动项目id")
	private Long evaluationId;

	private Long tenantId = -1L;

    private Boolean hiddenFlag;



    private String practiceTime;

    private String practiceSource;

    private String resultAnalyze;

    private Boolean headphoneFlag;

    private Long instrumentId;


    private Boolean delFlag;

    private Float playRate;
	@ApiModelProperty("曲目评测来源 TENANT 机构 PLATFORM 平台")
    private String providerType;
	public SysMusicCompareRecord(FeatureType feature) {
		this.feature = feature;
	}

	public SysMusicCompareRecord() {
	}

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

}
