package com.bonus.system.domain;

import com.bonus.common.core.annotation.Excel;
import com.bonus.common.core.web.domain.BaseEntity;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.util.Date;

/**
 * 【请填写功能名称】对象 sys_ip_whitelist
 *
 * @author bonus
 * @date 2024-11-06
 */
@EqualsAndHashCode(callSuper = true)
@Data
public class SysIpWhitelist extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 主键ID */
    private Long id;

    /** 单个IP地址 */
    @Excel(name = "单个IP地址")
    private String ipAddress;

    /** IP网段起始地址 */
    @Excel(name = "IP网段起始地址")
    private String ipRangeStart;

    /** IP网段结束地址 */
    @Excel(name = "IP网段结束地址")
    private String ipRangeEnd;

    /** 允许访问的开始时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "允许访问的开始时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date accessStartTime;

    /** 允许访问的结束时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "允许访问的结束时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date accessEndTime;

    /** 记录创建时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "记录创建时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date createdAt;

    /** 记录更新时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "记录更新时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date updatedAt;

    private String status;

    public void setId(Long id)
    {
        this.id = id;
    }

    public Long getId()
    {
        return id;
    }
    public void setIpAddress(String ipAddress)
    {
        this.ipAddress = ipAddress;
    }

    public String getIpAddress()
    {
        return ipAddress;
    }
    public void setIpRangeStart(String ipRangeStart)
    {
        this.ipRangeStart = ipRangeStart;
    }

    public String getIpRangeStart()
    {
        return ipRangeStart;
    }
    public void setIpRangeEnd(String ipRangeEnd)
    {
        this.ipRangeEnd = ipRangeEnd;
    }

    public String getIpRangeEnd()
    {
        return ipRangeEnd;
    }
    public void setAccessStartTime(Date accessStartTime)
    {
        this.accessStartTime = accessStartTime;
    }

    public Date getAccessStartTime()
    {
        return accessStartTime;
    }
    public void setAccessEndTime(Date accessEndTime)
    {
        this.accessEndTime = accessEndTime;
    }

    public Date getAccessEndTime()
    {
        return accessEndTime;
    }
    public void setCreatedAt(Date createdAt)
    {
        this.createdAt = createdAt;
    }

    public Date getCreatedAt()
    {
        return createdAt;
    }
    public void setUpdatedAt(Date updatedAt)
    {
        this.updatedAt = updatedAt;
    }

    public Date getUpdatedAt()
    {
        return updatedAt;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("ipAddress", getIpAddress())
                .append("ipRangeStart", getIpRangeStart())
                .append("ipRangeEnd", getIpRangeEnd())
                .append("accessStartTime", getAccessStartTime())
                .append("accessEndTime", getAccessEndTime())
                .append("createdAt", getCreatedAt())
                .append("updatedAt", getUpdatedAt())
                .toString();
    }
}
