package com.dcsoft.system.domain;

import java.util.Date;

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

/**
 * 通行规则对象 sys_rule
 *
 * @author nichun
 * @date 2023-03-08
 */
public class SysRule extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 规则Id */
    private Long id;

    /** 规则名称 */
    @Excel(name = "规则名称")
    private String name;

    /** 有效期开始 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "有效期开始", width = 30, dateFormat = "yyyy-MM-dd")
    private Date startTime;

    /** 有效期结束 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "有效期结束", width = 30, dateFormat = "yyyy-MM-dd")
    private Date endTime;

    /** 准入时间起 */
    @Excel(name = "准入时间起")
    private String admittanceStart;

    /** 准入时间止 */
    @Excel(name = "准入时间止")
    private String admittanceEnd;

    /** 设备空间 */
    private Long spaceId;

    @Excel(name = "设备空间")
    private String spaceName;

    /** 设备位置 */
    @Excel(name = "设备位置")
    private String pointId;

    /** 1:本地库 2:云端库 默认本地 */
    @Excel(name = "1:本地库 2:云端库 默认本地")
    private String type;

    /** facePermission 刷脸权限 idCardPermission 刷卡权限 faceAndCardPermission 人卡合一权限 idCardFacePermission 人证比对权限
passwordPermission 密码权限 */
    @Excel(name = "权限")
    private String permission;

    protected String[] checkList;

    protected String[] pointIds;

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

    public Long getId()
    {
        return id;
    }
    public void setName(String name)
    {
        this.name = name;
    }

    public String getName()
    {
        return name;
    }
    public void setStartTime(Date startTime)
    {
        this.startTime = startTime;
    }

    public Date getStartTime()
    {
        return startTime;
    }
    public void setEndTime(Date endTime)
    {
        this.endTime = endTime;
    }

    public Date getEndTime()
    {
        return endTime;
    }
    public void setAdmittanceStart(String admittanceStart)
    {
        this.admittanceStart = admittanceStart;
    }

    public String getAdmittanceStart()
    {
        return admittanceStart;
    }
    public void setAdmittanceEnd(String admittanceEnd)
    {
        this.admittanceEnd = admittanceEnd;
    }

    public String getAdmittanceEnd()
    {
        return admittanceEnd;
    }
    public void setSpaceId(Long spaceId)
    {
        this.spaceId = spaceId;
    }

    public Long getSpaceId()
    {
        return spaceId;
    }
    public void setPointId(String pointId)
    {
        this.pointId = pointId;
    }

    public String getPointId()
    {
        return pointId;
    }
    public void setType(String type)
    {
        this.type = type;
    }

    public String getType()
    {
        return type;
    }
    public void setPermission(String permission)
    {
        this.permission = permission;
    }

    public String getPermission()
    {
        return permission;
    }

    public String[] getCheckList() {
        return checkList;
    }

    public void setCheckList(String[] checkList) {
        this.checkList = checkList;
    }

    public String[] getPointIds() {
        return pointIds;
    }

    public void setPointIds(String[] pointIds) {
        this.pointIds = pointIds;
    }

    public String getSpaceName() {
        return spaceName;
    }

    public void setSpaceName(String spaceName) {
        this.spaceName = spaceName;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("name", getName())
            .append("startTime", getStartTime())
            .append("endTime", getEndTime())
            .append("admittanceStart", getAdmittanceStart())
            .append("admittanceEnd", getAdmittanceEnd())
            .append("spaceId", getSpaceId())
            .append("pointId", getPointId())
            .append("remark", getRemark())
            .append("createBy", getCreateBy())
            .append("createTime", getCreateTime())
            .append("updateBy", getUpdateBy())
            .append("updateTime", getUpdateTime())
            .append("type", getType())
            .append("permission", getPermission())
            .toString();
    }
}
