package com.ruoyi.fire.domain;
import java.util.Date;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
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;

/**

 消防设施维修记录对象 fire_facility_repair
 @author Junhua
 @date 2025-07-16
 */
public class FireFacilityRepair extends BaseEntity
{
    private static final long serialVersionUID = 1L;
    /** 维修 ID，自增主键 */
    private Long id;
    /** 设施 ID（逻辑关联 fire_facilities.id） */
    @Excel (name = "设施 ID")
    @NotNull (message = "设施 ID 不能为空")
    private Long facilityId;
    /** 维修日期 */
    @JsonFormat (pattern = "yyyy-MM-dd")
    @Excel (name = "维修日期", width = 30, dateFormat = "yyyy-MM-dd")
    @NotNull (message = "维修日期不能为空")
    private Date repairDate;
    /** 维修内容（详细描述） */
    @Excel (name = "维修内容")
    @NotBlank (message = "维修内容不能为空")
    @Size (max = 500, message = "维修内容不能超过 500 个字符")
    private String repairContent;
    /**
     维修结果（0 = 成功，1 = 失败，2 = 部分解决）
     通过 dictType 关联数据字典，实现 Excel 导出时的文本映射
     */
    @Excel (name = "维修结果", dictType = "fire_repair_result") // 核心修改：添加 dictType 关联字典
    @NotNull (message = "维修结果不能为空")
    private Integer repairResult;
    /** 操作人员（工号 || 姓名） */
    @Excel (name = "操作人员")
    @NotBlank (message = "操作人员不能为空")
    @Size (max = 20, message = "操作人员姓名不能超过 20 个字符")
    private String replacePerson;
    /** 下次检查日期 */
    @JsonFormat (pattern = "yyyy-MM-dd")
    @Excel (name = "下次检查日期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date nextCheckDate;
    /** 创建时间 */
    @JsonFormat (pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel (name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;
    /** 备注 */
    @Excel (name = "备注")
    @Size (max = 200, message = "备注不能超过 200 个字符")
    private String remark;
    // 以下为 getter/setter 方法（保持不变）
    public void setId (Long id)
    {
        this.id = id;
    }
    public Long getId()
    {
        return id;
    }
    public void setFacilityId(Long facilityId)
    {
        this.facilityId = facilityId;
    }
    public Long getFacilityId()
    {
        return facilityId;
    }
    public void setRepairDate(Date repairDate)
    {
        this.repairDate = repairDate;
    }
    public Date getRepairDate()
    {
        return repairDate;
    }
    public void setRepairContent(String repairContent)
    {
        this.repairContent = repairContent;
    }
    public String getRepairContent()
    {
        return repairContent;
    }
    public void setRepairResult(Integer repairResult)
    {
        this.repairResult = repairResult;
    }
    public Integer getRepairResult()
    {
        return repairResult;
    }
    public void setReplacePerson(String replacePerson)
    {
        this.replacePerson = replacePerson;
    }
    public String getReplacePerson()
    {
        return replacePerson;
    }
    public void setNextCheckDate(Date nextCheckDate)
    {
        this.nextCheckDate = nextCheckDate;
    }
    public Date getNextCheckDate()
    {
        return nextCheckDate;
    }
    @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("facilityId", getFacilityId())
                .append("repairDate", getRepairDate())
                .append("repairContent", getRepairContent())
                .append("repairResult", getRepairResult())
                .append("replacePerson", getReplacePerson())
                .append("nextCheckDate", getNextCheckDate())
                .append("remark", getRemark())
                .append("createTime", getCreateTime())
                .toString();
    }
}
