package com.xinelu.manage.domain.trainingitemplayrecord;

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.LocalDate;
import java.time.LocalDateTime;

/**
 * 学习培训项目播放日志记录对象 training_item_play_record
 *
 * @author xinyilu
 * @date 2023-04-20
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "学习培训项目播放日志记录对象", description = "training_item_play_record")
public class TrainingItemPlayRecord extends BaseDomain implements Serializable {
    private static final long serialVersionUID = 5808471517075078173L;
    /**
     * 主键id
     */
    private Long id;

    /**
     * 学习培训订单id
     */
    @ApiModelProperty(value = "学习培训订单id")
    @Excel(name = "学习培训订单id")
    private Long trainingOrderId;

    /**
     * 培训项目表id，此处id是学习培训订单明细表中的项目id
     */
    @ApiModelProperty(value = "培训项目表id，此处id是学习培训订单明细表中的项目id")
    @Excel(name = "培训项目表id，此处id是学习培训订单明细表中的项目id")
    private Long trainingItemId;

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

    /**
     * 培训项目章节表id，此处id是学习培训订单章节信息表中的id
     */
    @ApiModelProperty(value = "培训项目章节表id，此处id是学习培训订单章节信息表中的id")
    @Excel(name = "培训项目章节表id，此处id是学习培训订单章节信息表中的id")
    private Long trainingItemDirectoryId;

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

    /**
     * 护理员信息表id
     */
    @ApiModelProperty(value = "护理员信息表id")
    @Excel(name = "护理员信息表id")
    private Long nurseStationPersonId;

    /**
     * 护理站人员名称
     */
    @ApiModelProperty(value = "护理站人员名称")
    @Excel(name = "护理站人员名称")
    private String nursePersonName;

    /**
     * 播放时间，格式：yyyy-MM-dd HH:mm:ss
     */
    @ApiModelProperty(value = "播放时间，格式：yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "播放时间，格式：yyyy-MM-dd HH:mm:ss", width = 30, dateFormat = "yyyy-MM-dd")
    private LocalDateTime playTime;

    /**
     * 播放日期，格式：yyyy-MM-dd
     */
    @ApiModelProperty(value = "播放日期，格式：yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "播放日期，格式：yyyy-MM-dd", width = 30, dateFormat = "yyyy-MM-dd")
    private LocalDate playDate;


    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("trainingOrderId", getTrainingOrderId())
                .append("trainingItemId", getTrainingItemId())
                .append("trainingItemTitle", getTrainingItemTitle())
                .append("trainingItemDirectoryId", getTrainingItemDirectoryId())
                .append("trainingItemDirectoryName", getTrainingItemDirectoryName())
                .append("nurseStationPersonId", getNurseStationPersonId())
                .append("nursePersonName", getNursePersonName())
                .append("playTime", getPlayTime())
                .append("playDate", getPlayDate())
                .append("createBy", getCreateBy())
                .append("createTime", getCreateTime())
                .append("updateBy", getUpdateBy())
                .append("updateTime", getUpdateTime())
                .toString();
    }
}