/*
 * Copyright [2022] [https://www.xiaonuo.vip]
 *
 * Snowy采用APACHE LICENSE 2.0开源协议，您在使用过程中，需要注意以下几点：
 *
 * 1.请不要删除和修改根目录下的LICENSE文件。
 * 2.请不要删除和修改Snowy源码头部的版权声明。
 * 3.本项目代码可免费商业使用，商业使用请保留源码和相关描述文件的项目出处，作者声明等。
 * 4.分发源码时候，请注明软件出处 https://www.xiaonuo.vip
 * 5.不可二次分发开源参与同类竞品，如有想法可联系团队xiaonuobase@qq.com商议合作。
 * 6.若您的项目无法满足以上几点，需要更多功能代码，获取Snowy商业授权许可，请在官网购买授权，地址为 https://www.xiaonuo.vip
 */
package vip.xiaonuo.modular.warning.warningInfo.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.fhs.core.trans.anno.Trans;
import com.fhs.core.trans.constant.TransType;
import com.fhs.core.trans.vo.TransPojo;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import vip.xiaonuo.common.pojo.CommonEntity;
import vip.xiaonuo.modular.base.baseConfig.entity.BaseConfig;
import vip.xiaonuo.modular.base.pigpen.entity.BasePigpen;

import java.math.BigDecimal;
import java.util.Date;

/**
 * 预警实体
 *
 * @author newspaper
 * @date  2023/12/26 13:40
 **/
@Getter
@Setter
@TableName("warning_info")
public class WarningInfo extends CommonEntity implements TransPojo {

    /** id */
    @TableId
    @ApiModelProperty(value = "id", position = 1)
    private String id;

    /** 预警类型id */
    @ApiModelProperty(value = "预警类型id", position = 2)
    @Trans(type = TransType.SIMPLE,target = BaseConfig.class,fields = "configName", alias = "warning", ref = "warningType")
    private String warningTypeId;

    /** 预警内容 */
    @ApiModelProperty(value = "预警内容", position = 3)
    private String warningContent;

    /** 预警位置ID */
    @ApiModelProperty(value = "预警位置ID", position = 4)
    @Trans(type = TransType.SIMPLE,target = BasePigpen.class,fields = "fullName", alias = "unit", ref = "buildName")
    private String unitId;

    /** 预警状态 */
    @ApiModelProperty(value = "预警状态", position = 5)
    private Integer warningStatus;

    /** 通知人ID */
    @ApiModelProperty(value = "通知人ID", position = 6,example = "以逗号区分")
    private String warningNotifierId;

    /** 预警时间 */
    @ApiModelProperty(value = "预警时间", position = 7)
    private Date warningTime;

    /** 组织ID */
    @ApiModelProperty(value = "组织ID", position = 8)
    private String orgId;

    @ApiModelProperty(value = "通知人名称", position = 9)
    @TableField(exist = false)
    private String warningNotifierName;

    /** 预警类型 */
    @ApiModelProperty(value = "预警类型", position = 10)
    @TableField(exist = false)
    private String warningType;

    /** 预警位置 */
    @ApiModelProperty(value = "预警位置", position = 11)
    @TableField(exist = false)
    private String buildName;
}
