package com.ruoyi.fire.domain;

import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;

/**
 * 消防设施更换记录对象 fire_facility_replacement
 *
 * @author system
 * @date 2025-07-22
 */
public class FireFacilityReplacement extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 设施ID，自增主键 */
    @Excel(name = "设施ID，自增主键")
    private Long id;

    /** 原设施ID（逻辑关联fire_facilities.id） */
    @Excel(name = "原设施ID")
    @NotNull(message = "原设施ID不能为空")
    private Long oldFacilityId;

    /** 新设施ID（逻辑关联fire_facilities.id） */
    @Excel(name = "新设施ID")
    @NotNull(message = "新设施ID不能为空")
    private Long newFacilityId;

    /** 更换日期 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "更换日期", width = 30, dateFormat = "yyyy-MM-dd")
    @NotNull(message = "更换日期不能为空")
    private Date replaceDate;

    /** 更换原因（详细说明） */
    @Excel(name = "更换原因")
    @NotBlank(message = "更换原因不能为空")
    @Size(max = 200, message = "更换原因长度不能超过200个字符")
    private String replaceReason;

    /** 更换人（操作人员） */
    @Excel(name = "更换人")
    @NotBlank(message = "更换人不能为空")
    @Size(max = 20, message = "更换人姓名长度不能超过20个字符")
    private String replacePerson;

    /** 备注 */
    @Excel(name = "备注")
    @Size(max = 200, message = "备注长度不能超过200个字符")
    private String remark;

    /** 创建时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    // 以下为所有字段的getter和setter方法，确保每个字段都能被正确访问和设置

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

    public Long getId()
    {
        return id;
    }

    public void setOldFacilityId(Long oldFacilityId)
    {
        this.oldFacilityId = oldFacilityId;
    }

    public Long getOldFacilityId()
    {
        return oldFacilityId;
    }

    public void setNewFacilityId(Long newFacilityId)
    {
        this.newFacilityId = newFacilityId;
    }

    public Long getNewFacilityId()
    {
        return newFacilityId;
    }

    public void setReplaceDate(Date replaceDate)
    {
        this.replaceDate = replaceDate;
    }

    public Date getReplaceDate()
    {
        return replaceDate;
    }

    public void setReplaceReason(String replaceReason)
    {
        this.replaceReason = replaceReason;
    }

    public String getReplaceReason()
    {
        return replaceReason;
    }

    public void setReplacePerson(String replacePerson)
    {
        this.replacePerson = replacePerson;
    }

    public String getReplacePerson()
    {
        return replacePerson;
    }

    @Override
    public void setRemark(String remark)
    {
        this.remark = remark;
    }

    @Override
    public String getRemark()
    {
        return remark;
    }

    @Override
    public void setCreateTime(Date createTime)
    {
        this.createTime = createTime;
    }

    @Override
    public Date getCreateTime()
    {
        return createTime;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("oldFacilityId", getOldFacilityId())
                .append("newFacilityId", getNewFacilityId())
                .append("replaceDate", getReplaceDate())
                .append("replaceReason", getReplaceReason())
                .append("replacePerson", getReplacePerson())
                .append("remark", getRemark())
                .append("createTime", getCreateTime())
                .toString();
    }
}
