package org.jeecg.modules.adweb.enquiry.entity;

import com.baomidou.mybatisplus.annotation.IdType;
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 io.swagger.v3.oas.annotations.media.Schema;
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.io.Serializable;
import java.util.Date;

/**
 * @Description: IP黑名单
 * @Author: jeecg-boot
 * @Date:   2023-02-20
 * @Version: V1.0
 */
@Data
@TableName("adweb_public_black_ip")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@Schema(description="IP黑名单")
public class AdwebPublicBlackIp implements Serializable {
    private static final long serialVersionUID = 1L;

	/**主键*/
	@TableId(type = IdType.ASSIGN_ID)
    @Schema(description = "主键")
    private String id;
	/**创建日期*/
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @Schema(description = "创建日期")
    private Date createTime;
	/**状态*/
	@Excel(name = "状态", width = 15)
    @Schema(description = "状态")
    private Integer status;
	/**ip*/
	@Excel(name = "ip", width = 15)
    @Schema(description = "ip")
    private String ip;
	/**黑名单或白名单*/
	@Excel(name = "黑名单或白名单", width = 15)
    @Schema(description = "黑名单或白名单")
    private Integer blackOrWhite;

	@TableField(exist = false)
    private Integer wasteEnquiryNum;

    public AdwebPublicBlackIp() {
    }

    public AdwebPublicBlackIp(String ip, Integer status, Integer blackOrWhite) {
        this.status = status;
        this.ip = ip;
        this.blackOrWhite = blackOrWhite;
    }
}
