package com.xunmei.core.access.domain;

import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
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;

/**
 * 监控调阅计划对象 t_monitoring_retrieval_plan
 *
 * @author xunmei
 * @date 2023-08-24
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("core_monitoring_retrieval_plan")
@ApiModel(value = "TMonitoringRetrievalPlan对象", description = "监控调阅计划")
public class TMonitoringRetrievalPlan extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    @JsonSerialize(using = ToStringSerializer.class)
    private Long id;

    /**
     * 计划名称
     */
    @ApiModelProperty(value = "计划名称")
    private String planName;

    /**
     * 计划归属机构
     */
    @ApiModelProperty(value = "计划归属机构")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long orgId;
    @ApiModelProperty(value = "开始时间")
    private Date startTime;
    @ApiModelProperty(value = "结束时间")
    private Date endTime;
    @ApiModelProperty(value = "下发类型0自建1下发")
    private Integer createType;
    /**
     * 计划归属机构
     */
    @ApiModelProperty(value = "计划归属机构")
    private String orgPath;

    /**
     * 计划归属机构
     */
    @ApiModelProperty(value = "计划归属机构")
    private String orgName;

    /**
     * 调阅机构类型
     */
    @ApiModelProperty(value = "调阅机构类型")
    private String orgType;

    /**
     * 调阅角色
     */
    @ApiModelProperty(value = "调阅角色")
    private Long roleId;
    @ApiModelProperty(value = "调阅角色")
    private String roleName;
    /**
     * 调阅周期无周期、每日、每周、每月、每季度、每半年、每年（0-6）
     */
    @ApiModelProperty(value = "调阅周期无周期、每日、每周、每月、每季度、每半年、每年", notes = "0=-6")
    private String planCycle;

    /**
     * 调阅频次
     */
    @ApiModelProperty(value = "调阅频次")
    private Long planFrequency;

    /**
     * 计划状态（0启用、1禁用）
     */
    @ApiModelProperty(value = "计划状态", notes = "0=启用、1禁用")
    private Integer planStatus;

    /**
     * 备注
     */
    @ApiModelProperty(value = "备注")
    private String description;

    /**
     * 是否删除（0正常，1删除）
     */
    @ApiModelProperty(value = "是否删除", notes = "0=正常，1删除")
    private Long isDeleted;


    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)


                .append("id", getId())


                .append("planName", getPlanName())


                .append("orgId", getOrgId())


                .append("orgPath", getOrgPath())


                .append("orgName", getOrgName())

                .append("orgType", getOrgType())


                .append("roleId", getRoleId())
                .append("roleName", getRoleName())

                .append("planCycle", getPlanCycle())

                .append("roleName", roleName)
                .append("planFrequency", getPlanFrequency())


                .append("planStatus", getPlanStatus())


                .append("createTime", getCreateTime())


                .append("createBy", getCreateBy())


                .append("updateTime", getUpdateTime())


                .append("updateBy", getUpdateBy())


                .append("description", getDescription())


                .append("isDeleted", getIsDeleted())
                .toString();
    }
}
