package com.xinelu.manage.domain.trainingitemdirectory;

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 java.io.Serializable;
import java.time.LocalTime;

/**
 * 学习培训项目章节对象 training_item_directory
 *
 * @author xinyilu
 * @date 2023-04-20
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "学习培训项目章节对象", description = "training_item_directory")
public class TrainingItemDirectory extends BaseDomain implements Serializable {
    private static final long serialVersionUID = -1110703661850660701L;
    /**
     * 主键id
     */
    private Long id;

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

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

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

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

    /**
     * 培训项目章节视频存放地址
     */
    @ApiModelProperty(value = "培训项目章节视频存放地址")
    @Excel(name = "培训项目章节视频存放地址")
    private String itemDirectoryUrl;

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

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

    /**
     * 培训项目章节排序
     */
    @ApiModelProperty(value = "培训项目章节排序")
    @Excel(name = "培训项目章节排序")
    private Integer itemDirectorySort;


    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("trainingItemId", getTrainingItemId())
                .append("itemDirectoryName", getItemDirectoryName())
                .append("itemDirectoryCode", getItemDirectoryCode())
                .append("itemDirectoryTitle", getItemDirectoryTitle())
                .append("itemDirectoryUrl", getItemDirectoryUrl())
                .append("itemDirectoryIntroduce", getItemDirectoryIntroduce())
                .append("itemDirectorySort", getItemDirectorySort())
                .append("createBy", getCreateBy())
                .append("createTime", getCreateTime())
                .append("updateBy", getUpdateBy())
                .append("updateTime", getUpdateTime())
                .toString();
    }
}