package com.xunmei.common.core.domain.edu.domain;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.xunmei.common.core.web.domain.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.util.Date;

/**
 * 教育任务对象 core_edu_training_task
 *
 * @author xunmei
 * @date 2023-08-27
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("core_edu_training_task")
@ApiModel(value = "CoreEduTrainingTask对象", description = "教育任务")
public class CoreEduTrainingTask extends BaseEntity {
    private static final long serialVersionUID = 1L;


    @TableId
    @JsonSerialize(using = com.fasterxml.jackson.databind.ser.std.ToStringSerializer.class)
    private Long id;

    @TableField("plan_id")
    @ApiModelProperty(value = "教育培训计划Id")
    private Long planId;

    @TableField("org_id")
    @ApiModelProperty(value = "机构")
    private Long orgId;


    @TableField("org_name")
    @ApiModelProperty(value = "机构名称")
    private String orgName;


    @TableField("org_path")
    @ApiModelProperty(value = "机构")
    private String orgPath;


    @TableField("title")
    @ApiModelProperty(value = "学习主题")
    private String title;


    /**
     * @see com.xunmei.common.core.enums.edu.EduTrainingDoStatus
     * 类型
     */
    @TableField("type")
    @ApiModelProperty(value = "类型")
    private Integer type;

    @TableField("host_id")
    @ApiModelProperty(value = "主持人")
    private Long hostId;

    @TableField("recorder_id")
    @ApiModelProperty(value = "记录人")
    private Long recorderId;


    @TableField("start_date")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @ApiModelProperty(value = "任务计划开始日期")
    private Date startDate;

    @TableField("end_date")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @ApiModelProperty(value = "任务计划截止日期")
    private Date endDate;


    @TableField("training_start_date_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @ApiModelProperty(value = "培训开始时间")
    private Date trainingStartDateTime;

    @TableField("training_end_date_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @ApiModelProperty(value = "培训截止时间")
    private Date trainingEndDateTime;

    /**
     * @see com.xunmei.common.core.enums.edu.EduTrainingDoStatus
     */
    @TableField("status")
    @ApiModelProperty(value = "状态")
    private Integer status;


    @TableField("content")
    @ApiModelProperty(value = "内容")
    private String content;


    @TableField("note")
    @ApiModelProperty(value = "总结")
    private String note;


    @TableField("plan_cycle")
    @ApiModelProperty(value = "周期")
    private Integer planCycle;


    @TableField("file_list")
    @ApiModelProperty(value = "附件")
    private String fileList;

    @TableField("image_list")
    @ApiModelProperty(value = "图片")
    private String imageList;


    @TableField("pdf_url")
    @ApiModelProperty(value = "pdf下载地址")
    private String pdfUrl;


    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("planId", getPlanId())
                .append("startDate", getStartDate())
                .append("endDate", getEndDate())
                .append("content", getContent())
                .append("title", getTitle())
                .append("note", getNote())
                .append("trainingStartDateTime", getTrainingStartDateTime())
                .append("trainingEndDateTime", getTrainingEndDateTime())
                .append("hostId", getHostId())
                .append("fileList", getFileList())
                .append("imageList", getImageList())
                .append("orgId", getOrgId())
                .append("type", getType())
                .append("orgName", getOrgName())
                .append("orgPath", getOrgPath())
                .append("pdfUrl", getPdfUrl())
                .append("createBy", getCreateBy())
                .append("createTime", getCreateTime())
                .append("updateBy", getUpdateBy())
                .append("updateTime", getUpdateTime())
                .toString();
    }
}
