package com.xinelu.manage.domain.trainingorderitemdirectory;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.xinelu.common.annotation.Excel;
import com.xinelu.common.core.domain.BaseDomain;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.time.LocalTime;

/**
 * 学习培训订单明细章节，记录视频学习和直播课程的章节信息对象 training_order_item_directory
 *
 * @author xinyilu
 * @date 2023-04-20
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "学习培训订单明细章节，记录视频学习和直播课程的章节信息对象", description = "training_order_item_directory")
public class TrainingOrderItemDirectory extends BaseDomain implements Serializable {

    private static final long serialVersionUID = -8514498637237874587L;
    /**
     * 主键id
     */
    private Long id;

    /**
     * 培训订单明细表id
     */
    @ApiModelProperty(value = "培训订单明细表id")
    @Excel(name = "培训订单明细表id")
    private Long trainingOrderDetailsId;

    /**
     * 订单编号
     */
    @ApiModelProperty(value = "订单编号")
    @Excel(name = "订单编号")
    private String trainingOrderNo;

    /**
     * 培训项目章节表id
     */
    @ApiModelProperty(value = "培训项目章节表id")
    @Excel(name = "培训项目章节表id")
    private Long trainingItemDirectoryId;

    /**
     * 培训项目章节录名称
     */
    @ApiModelProperty(value = "培训项目章节录名称")
    @Excel(name = "培训项目章节录名称")
    private String itemDirectoryName;

    /**
     * 培训项目章节编码
     */
    @ApiModelProperty(value = "培训项目章节编码")
    @Excel(name = "培训项目章节编码")
    private String itemDirectoryCode;

    /**
     * 培训项目章节标题
     */
    @ApiModelProperty(value = "培训项目章节标题")
    @Excel(name = "培训项目章节标题")
    private String itemDirectoryTitle;

    /**
     * 培训项目章节视频存放地址
     */
    private String itemDirectoryUrl;

    /**
     * 培训章节视频时长
     */
    @JsonFormat(pattern = "HH:mm:ss")
    @DateTimeFormat(pattern = "HH:mm:ss")
    private LocalTime itemDirectoryVideoDuration;

    /**
     * 培训项目章节内容简介
     */
    @ApiModelProperty(value = "培训项目章节内容简介")
    @Excel(name = "培训项目章节内容简介")
    private String itemDirectoryIntroduce;

    /**
     * 未观看：NOT_WATCHED，已观看：WATCHED，已看完：FINISHED_READING
     */
    private String itemDirectoryWatchStatus;

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("trainingOrderDetailsId", getTrainingOrderDetailsId())
                .append("trainingOrderNo", getTrainingOrderNo())
                .append("trainingItemDirectoryId", getTrainingItemDirectoryId())
                .append("itemDirectoryName", getItemDirectoryName())
                .append("itemDirectoryCode", getItemDirectoryCode())
                .append("itemDirectoryTitle", getItemDirectoryTitle())
                .append("itemDirectoryIntroduce", getItemDirectoryIntroduce())
                .append("createBy", getCreateBy())
                .append("createTime", getCreateTime())
                .append("updateBy", getUpdateBy())
                .append("updateTime", getUpdateTime())
                .toString();
    }
}