package com.sundot.airport.equipment.domain;

import java.util.Date;
import java.util.List;

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 com.sundot.airport.common.domain.BaseAttachment;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.sundot.airport.common.annotation.Excel;
import com.sundot.airport.common.core.domain.BaseEntity;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * 设备台账对象 equipment_ledger
 *
 * @author ruoyi
 * @date 2026-05-12
 */
@TableName("equipment_ledger")
public class EquipmentLedger extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /** 租户号 */
    private String tenantId;

    /** 乐观锁 */
    private Integer revision;

    /** 主键 */
    @TableId(type = IdType.AUTO)
    private Long id;

    /** 设备编号 */
    @Excel(name = "设备编号", type = Excel.Type.EXPORT)
    private String equipmentCode;

    /** 设备名称 */
    @Excel(name = "设备名称")
    private String equipmentName;

    /** 设备种类 */
    @Excel(name = "设备种类")
    private String equipmentType;

    /** 设备类别 */
    @Excel(name = "设备类别")
    private String equipmentCategory;

    /** 设备品牌 */
    @Excel(name = "设备品牌")
    private String equipmentBrand;

    /** 设备型号 */
    @Excel(name = "设备型号")
    private String equipmentModel;

    /** 设备序列号 */
    @Excel(name = "设备序列号")
    private String equipmentSerialNumber;

    /** 生产厂家 */
    @Excel(name = "生产厂家")
    private String manufacturer;

    /** 出厂日期 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "出厂日期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date manufacturingDate;

    /** 验收日期 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "验收日期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date acceptanceDate;

    /** 启用日期 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "启用日期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date commissioningDate;

    /** 首次验收情况 */
    @Excel(name = "首次验收情况")
    private String initialAcceptanceStatus;

    /** 使用状态 */
    @Excel(name = "使用状态", readConverterExp = "IN_USE=在用,SEND_FOR_REPAIR=寄修,LEND=借出,DEACTIVATE=停用,NOT_ENABLED=未启用,SUSPEND_USE=暂停使用", combo = "在用,寄修,借出,停用,未启用,暂停使用")
    private String usageStatus;

    /** 报废日期 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "报废日期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date scrappingDate;

    /** 安装位置 */
    @Excel(name = "安装位置")
    private String installationLocation;

    /** 航站楼编码 */
    @Excel(name = "航站楼编码", type = Excel.Type.EXPORT)
    private String terminlCode;

    /** 航站楼名称 */
    @Excel(name = "航站楼名称")
    private String terminlName;

    /** 区域编码 */
    @Excel(name = "区域编码", type = Excel.Type.EXPORT)
    private String regionalCode;

    /** 区域名称 */
    @Excel(name = "区域名称")
    private String regionalName;

    /** 通道编码 */
    @Excel(name = "通道编码", type = Excel.Type.EXPORT)
    private String channelCode;

    /** 通道名称 */
    @Excel(name = "通道名称")
    private String channelName;

    /** 定/自检日期 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "定/自检日期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date inspectionSelfCheckDate;

    /** 定/自检周期 */
    @Excel(name = "定/自检周期")
    private Integer inspectionSelfCheckCycle;

    /** 最近定/自检到期日期 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "最近定/自检到期日期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date nextInspectionDueDate;

    /** 定/自检小组组长ID */
    @Excel(name = "定/自检小组组长ID", type = Excel.Type.EXPORT)
    private Long inspectionTeamLeaderId;

    /** 定/自检小组组长名称 */
    @Excel(name = "定/自检小组组长名称")
    private String inspectionTeamLeaderName;

    /** 定/自检小组组员1ID */
    @Excel(name = "定/自检小组组员1ID", type = Excel.Type.EXPORT)
    private Long inspectionTeamMember1Id;

    /** 定/自检小组组员1名称 */
    @Excel(name = "定/自检小组组员1名称")
    private String inspectionTeamMember1Name;

    /** 定/自检小组组员2ID */
    @Excel(name = "定/自检小组组员2ID", type = Excel.Type.EXPORT)
    private Long inspectionTeamMember2Id;

    /** 定/自检小组组员2名称 */
    @Excel(name = "定/自检小组组员2名称")
    private String inspectionTeamMember2Name;

    /** 设备定检记录列表*/
    @TableField(exist = false)
    private List<EquipmentInspectionRecord> equipmentInspectionRecordList;

    /** 设备照片列表*/
    @TableField(exist = false)
    private List<BaseAttachment> baseAttachmentList;

    /** 查询定/自检小组人员ID*/
    @TableField(exist = false)
    private String inspectionTeamUserId;

    /** 查询定/自检小组人员ID名称*/
    @TableField(exist = false)
    private String inspectionTeamUserName;

    /** 颜色*/
    @TableField(exist = false)
    private String colorType;

    /** 查询最近定/自检到期日期开始日期 */
    @TableField(exist = false)
    @JsonFormat(pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date startDate;

    /** 查询最近定/自检到期日期结束日期 */
    @TableField(exist = false)
    @JsonFormat(pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date endDate;

    public void setTenantId(String tenantId) {
        this.tenantId = tenantId;
    }

    public String getTenantId() {
        return tenantId;
    }

    public void setRevision(Integer revision) {
        this.revision = revision;
    }

    public Integer getRevision() {
        return revision;
    }

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

    public Long getId() {
        return id;
    }

    public void setEquipmentCode(String equipmentCode) {
        this.equipmentCode = equipmentCode;
    }

    public String getEquipmentCode() {
        return equipmentCode;
    }

    public void setEquipmentName(String equipmentName) {
        this.equipmentName = equipmentName;
    }

    public String getEquipmentName() {
        return equipmentName;
    }

    public void setEquipmentType(String equipmentType) {
        this.equipmentType = equipmentType;
    }

    public String getEquipmentType() {
        return equipmentType;
    }

    public void setEquipmentCategory(String equipmentCategory) {
        this.equipmentCategory = equipmentCategory;
    }

    public String getEquipmentCategory() {
        return equipmentCategory;
    }

    public void setEquipmentBrand(String equipmentBrand) {
        this.equipmentBrand = equipmentBrand;
    }

    public String getEquipmentBrand() {
        return equipmentBrand;
    }

    public void setEquipmentModel(String equipmentModel) {
        this.equipmentModel = equipmentModel;
    }

    public String getEquipmentModel() {
        return equipmentModel;
    }

    public void setEquipmentSerialNumber(String equipmentSerialNumber) {
        this.equipmentSerialNumber = equipmentSerialNumber;
    }

    public String getEquipmentSerialNumber() {
        return equipmentSerialNumber;
    }

    public void setManufacturer(String manufacturer) {
        this.manufacturer = manufacturer;
    }

    public String getManufacturer() {
        return manufacturer;
    }

    public void setManufacturingDate(Date manufacturingDate) {
        this.manufacturingDate = manufacturingDate;
    }

    public Date getManufacturingDate() {
        return manufacturingDate;
    }

    public void setAcceptanceDate(Date acceptanceDate) {
        this.acceptanceDate = acceptanceDate;
    }

    public Date getAcceptanceDate() {
        return acceptanceDate;
    }

    public void setCommissioningDate(Date commissioningDate) {
        this.commissioningDate = commissioningDate;
    }

    public Date getCommissioningDate() {
        return commissioningDate;
    }

    public void setInitialAcceptanceStatus(String initialAcceptanceStatus) {
        this.initialAcceptanceStatus = initialAcceptanceStatus;
    }

    public String getInitialAcceptanceStatus() {
        return initialAcceptanceStatus;
    }

    public void setUsageStatus(String usageStatus) {
        this.usageStatus = usageStatus;
    }

    public String getUsageStatus() {
        return usageStatus;
    }

    public void setScrappingDate(Date scrappingDate) {
        this.scrappingDate = scrappingDate;
    }

    public Date getScrappingDate() {
        return scrappingDate;
    }

    public void setInstallationLocation(String installationLocation) {
        this.installationLocation = installationLocation;
    }

    public String getInstallationLocation() {
        return installationLocation;
    }

    public String getTerminlCode() {
        return terminlCode;
    }

    public void setTerminlCode(String terminlCode) {
        this.terminlCode = terminlCode;
    }

    public String getTerminlName() {
        return terminlName;
    }

    public void setTerminlName(String terminlName) {
        this.terminlName = terminlName;
    }

    public String getRegionalCode() {
        return regionalCode;
    }

    public void setRegionalCode(String regionalCode) {
        this.regionalCode = regionalCode;
    }

    public String getRegionalName() {
        return regionalName;
    }

    public void setRegionalName(String regionalName) {
        this.regionalName = regionalName;
    }

    public String getChannelCode() {
        return channelCode;
    }

    public void setChannelCode(String channelCode) {
        this.channelCode = channelCode;
    }

    public String getChannelName() {
        return channelName;
    }

    public void setChannelName(String channelName) {
        this.channelName = channelName;
    }

    public void setInspectionSelfCheckDate(Date inspectionSelfCheckDate) {
        this.inspectionSelfCheckDate = inspectionSelfCheckDate;
    }

    public Date getInspectionSelfCheckDate() {
        return inspectionSelfCheckDate;
    }

    public void setInspectionSelfCheckCycle(Integer inspectionSelfCheckCycle) {
        this.inspectionSelfCheckCycle = inspectionSelfCheckCycle;
    }

    public Integer getInspectionSelfCheckCycle() {
        return inspectionSelfCheckCycle;
    }

    public void setNextInspectionDueDate(Date nextInspectionDueDate) {
        this.nextInspectionDueDate = nextInspectionDueDate;
    }

    public Date getNextInspectionDueDate() {
        return nextInspectionDueDate;
    }

    public void setInspectionTeamLeaderId(Long inspectionTeamLeaderId) {
        this.inspectionTeamLeaderId = inspectionTeamLeaderId;
    }

    public Long getInspectionTeamLeaderId() {
        return inspectionTeamLeaderId;
    }

    public void setInspectionTeamLeaderName(String inspectionTeamLeaderName) {
        this.inspectionTeamLeaderName = inspectionTeamLeaderName;
    }

    public String getInspectionTeamLeaderName() {
        return inspectionTeamLeaderName;
    }

    public void setInspectionTeamMember1Id(Long inspectionTeamMember1Id) {
        this.inspectionTeamMember1Id = inspectionTeamMember1Id;
    }

    public Long getInspectionTeamMember1Id() {
        return inspectionTeamMember1Id;
    }

    public void setInspectionTeamMember1Name(String inspectionTeamMember1Name) {
        this.inspectionTeamMember1Name = inspectionTeamMember1Name;
    }

    public String getInspectionTeamMember1Name() {
        return inspectionTeamMember1Name;
    }

    public void setInspectionTeamMember2Id(Long inspectionTeamMember2Id) {
        this.inspectionTeamMember2Id = inspectionTeamMember2Id;
    }

    public Long getInspectionTeamMember2Id() {
        return inspectionTeamMember2Id;
    }

    public void setInspectionTeamMember2Name(String inspectionTeamMember2Name) {
        this.inspectionTeamMember2Name = inspectionTeamMember2Name;
    }

    public String getInspectionTeamMember2Name() {
        return inspectionTeamMember2Name;
    }

    public List<EquipmentInspectionRecord> getEquipmentInspectionRecordList() {
        return equipmentInspectionRecordList;
    }

    public void setEquipmentInspectionRecordList(List<EquipmentInspectionRecord> equipmentInspectionRecordList) {
        this.equipmentInspectionRecordList = equipmentInspectionRecordList;
    }

    public List<BaseAttachment> getBaseAttachmentList() {
        return baseAttachmentList;
    }

    public void setBaseAttachmentList(List<BaseAttachment> baseAttachmentList) {
        this.baseAttachmentList = baseAttachmentList;
    }

    public String getInspectionTeamUserId() {
        return inspectionTeamUserId;
    }

    public void setInspectionTeamUserId(String inspectionTeamUserId) {
        this.inspectionTeamUserId = inspectionTeamUserId;
    }

    public String getInspectionTeamUserName() {
        return inspectionTeamUserName;
    }

    public void setInspectionTeamUserName(String inspectionTeamUserName) {
        this.inspectionTeamUserName = inspectionTeamUserName;
    }

    public String getColorType() {
        return colorType;
    }

    public void setColorType(String colorType) {
        this.colorType = colorType;
    }

    public Date getStartDate() {
        return startDate;
    }

    public void setStartDate(Date startDate) {
        this.startDate = startDate;
    }

    public Date getEndDate() {
        return endDate;
    }

    public void setEndDate(Date endDate) {
        this.endDate = endDate;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("tenantId", getTenantId())
                .append("revision", getRevision())
                .append("createBy", getCreateBy())
                .append("createTime", getCreateTime())
                .append("updateBy", getUpdateBy())
                .append("updateTime", getUpdateTime())
                .append("remark", getRemark())
                .append("id", getId())
                .append("equipmentCode", getEquipmentCode())
                .append("equipmentName", getEquipmentName())
                .append("equipmentType", getEquipmentType())
                .append("equipmentCategory", getEquipmentCategory())
                .append("equipmentBrand", getEquipmentBrand())
                .append("equipmentModel", getEquipmentModel())
                .append("equipmentSerialNumber", getEquipmentSerialNumber())
                .append("manufacturer", getManufacturer())
                .append("manufacturingDate", getManufacturingDate())
                .append("acceptanceDate", getAcceptanceDate())
                .append("commissioningDate", getCommissioningDate())
                .append("initialAcceptanceStatus", getInitialAcceptanceStatus())
                .append("usageStatus", getUsageStatus())
                .append("scrappingDate", getScrappingDate())
                .append("installationLocation", getInstallationLocation())
                .append("terminlCode", getTerminlCode())
                .append("terminlName", getTerminlName())
                .append("regionalCode", getRegionalCode())
                .append("regionalName", getRegionalName())
                .append("channelCode", getChannelCode())
                .append("channelName", getChannelName())
                .append("inspectionSelfCheckDate", getInspectionSelfCheckDate())
                .append("inspectionSelfCheckCycle", getInspectionSelfCheckCycle())
                .append("nextInspectionDueDate", getNextInspectionDueDate())
                .append("inspectionTeamLeaderId", getInspectionTeamLeaderId())
                .append("inspectionTeamLeaderName", getInspectionTeamLeaderName())
                .append("inspectionTeamMember1Id", getInspectionTeamMember1Id())
                .append("inspectionTeamMember1Name", getInspectionTeamMember1Name())
                .append("inspectionTeamMember2Id", getInspectionTeamMember2Id())
                .append("inspectionTeamMember2Name", getInspectionTeamMember2Name())
                .append("equipmentInspectionRecordList", getEquipmentInspectionRecordList())
                .append("baseAttachmentList", getBaseAttachmentList())
                .append("colorType", getColorType())
                .toString();
    }
}
