package org.xyzh.common.dto.study;

import org.xyzh.common.dto.BaseDTO;
import java.math.BigDecimal;
import java.util.Date;

/**
 * @description 学习观看历史表
 * @filename TbLearningHistory.java
 * @author yslg
 * @copyright xyzh
 * @since 2025-10-27
 */
public class TbLearningHistory extends BaseDTO {
    
    private static final long serialVersionUID = 1L;
    
    /**
     * @description 用户ID
     */
    private String userID;

    /**
     * @description 学习会话ID
     */
    private String historyID;
    
    /**
     * @description 资源类型（1资源/新闻 2课程 3章节 4节点）
     */
    private Integer resourceType;
    
    /**
     * @description 资源ID
     */
    private String resourceID;

    /**
     * @description 课程ID
     */
    private String courseID;

    /**
     * @description 章节ID
     */
    private String chapterID;

    /**
     * @description 节点ID
     */
    private String nodeID;

    /**
     * @description 关联任务ID
     */
    private String taskID;
    
    /**
     * @description 开始学习时间
     */
    private Date startTime;
    
    /**
     * @description 结束学习时间
     */
    private Date endTime;
    
    /**
     * @description 本次学习时长（秒）
     */
    private Integer duration;
    
    /**
     * @description 开始进度（0-100）
     */
    private BigDecimal startProgress;
    
    /**
     * @description 结束进度（0-100）
     */
    private BigDecimal endProgress;
    
    /**
     * @description 设备类型（web/mobile/app）
     */
    private String deviceType;
    
    /**
     * @description IP地址
     */
    private String ipAddress;
    
    /**
     * @description 创建者
     */
    private String creator;

    public String getUserID() {
        return userID;
    }

    public void setUserID(String userID) {
        this.userID = userID;
    }

    public String getHistoryID() {
        return historyID;
    }

    public void setHistoryID(String historyID) {
        this.historyID = historyID;
    }

    public Integer getResourceType() {
        return resourceType;
    }

    public void setResourceType(Integer resourceType) {
        this.resourceType = resourceType;
    }

    public String getResourceID() {
        return resourceID;
    }

    public void setResourceID(String resourceID) {
        this.resourceID = resourceID;
    }

    public String getCourseID() {
        return courseID;
    }

    public void setCourseID(String courseID) {
        this.courseID = courseID;
    }

    public String getChapterID() {
        return chapterID;
    }

    public void setChapterID(String chapterID) {
        this.chapterID = chapterID;
    }

    public String getNodeID() {
        return nodeID;
    }

    public void setNodeID(String nodeID) {
        this.nodeID = nodeID;
    }

    public String getTaskID() {
        return taskID;
    }

    public void setTaskID(String taskID) {
        this.taskID = taskID;
    }

    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 Integer getDuration() {
        return duration;
    }

    public void setDuration(Integer duration) {
        this.duration = duration;
    }

    public BigDecimal getStartProgress() {
        return startProgress;
    }

    public void setStartProgress(BigDecimal startProgress) {
        this.startProgress = startProgress;
    }

    public BigDecimal getEndProgress() {
        return endProgress;
    }

    public void setEndProgress(BigDecimal endProgress) {
        this.endProgress = endProgress;
    }

    public String getDeviceType() {
        return deviceType;
    }

    public void setDeviceType(String deviceType) {
        this.deviceType = deviceType;
    }

    public String getIpAddress() {
        return ipAddress;
    }

    public void setIpAddress(String ipAddress) {
        this.ipAddress = ipAddress;
    }

    public String getCreator() {
        return creator;
    }

    public void setCreator(String creator) {
        this.creator = creator;
    }

    @Override
    public String toString() {
        return "TbLearningHistory{" +
                "id=" + getID() +
                ", userID='" + userID + '\'' +
                ", historyID='" + historyID + '\'' +
                ", resourceType=" + resourceType +
                ", resourceID='" + resourceID + '\'' +
                ", courseID='" + courseID + '\'' +
                ", chapterID='" + chapterID + '\'' +
                ", nodeID='" + nodeID + '\'' +
                ", taskID='" + taskID + '\'' +
                ", startTime=" + startTime +
                ", endTime=" + endTime +
                ", duration=" + duration +
                ", startProgress=" + startProgress +
                ", endProgress=" + endProgress +
                ", deviceType='" + deviceType + '\'' +
                ", ipAddress='" + ipAddress + '\'' +
                ", creator='" + creator + '\'' +
                ", createTime=" + getCreateTime() +
                '}';
    }
}

