package cn.com.ctop.alarm.modules.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

/**
 * 规则和计划、组关系表
 *alarm_rule_campaign_rel
 * @author jeecg-boot
 * @version V1.0
 * @date 2020-11-09
 */
@Data
@TableName("ctop_alarm_rule_campaign_rel")
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value = "ctop_alarm_rule_campaign_rel对象", description = "规则和计划、组关系表")
public class AlarmRuleCampaignRel {

    /**
     * 规则id
     */
    @Excel(name = "规则id", width = 15)
    @ApiModelProperty(value = "规则id")
    private Long eventRuleId;
    /**
     * 账户id
     */
    @Excel(name = "账户id", width = 15)
    @ApiModelProperty(value = "账户id")
    private Long accountId;
    /**
     * 计划id
     */
    @Excel(name = "计划id", width = 15)
    @ApiModelProperty(value = "计划id")
    private Long campaignId;
    @TableField(exist = false)
    private String campaignName;
    /**
     * 组id
     */
    @Excel(name = "组id", width = 15)
    @ApiModelProperty(value = "组id")
    private Long unitId;
    @TableField(exist = false)
    private String unitName;
    /**
     * 规则级别 account-账户级；unit-组级；campaign-计划级
     */
    @Excel(name = "规则级别 ACCOUNT-账户级；UNIT-组级；CAMPAIGN-计划级", width = 15)
    @ApiModelProperty(value = "规则级别 account-账户级；unit-组级；campaign-计划级")
    private String eventRuleLevel;
    /**
     * createTime
     */
    @Excel(name = "createTime", width = 20, format = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "createTime")
    private Date createTime;
    /**
     * updateTime
     */
    @Excel(name = "updateTime", width = 20, format = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "updateTime")
    private Date updateTime;
}
