package com.casic.missiles.model.equipment;

import com.alibaba.excel.annotation.ExcelProperty;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.casic.missiles.annotation.DictCodeField;
import com.casic.missiles.constants.MeterDictCode;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;

/**
 * <p>
 * 设备申请设备表
 * </p>
 *
 * @author xiezhuangz
 * @since 2022-12-21
 */
@Data
@ApiModel
@TableName("equipment_apply_equipment")
public class EquipmentApplyEquipment implements Serializable {

    private static final long serialVersionUID = 8070278368190989986L;

    /**
     * 主键
     */
    @TableId("id")
    @ApiModelProperty(value = "主键", dataType = "Long")
    private Long id;

    /**
     * 申请ID
     */
    @TableField("apply_id")
    @ApiModelProperty(value = "申请ID", dataType = "String")
    private String applyId;

    /**
     * 设备ID
     */
    @TableField("equipment_id")
    @ApiModelProperty(value = "设备ID", dataType = "String")
    private String equipmentId;

    /**
     * 测量范围
     */
    @TableField("measure_range")
    @ApiModelProperty(value = "测量范围", dataType = "String")
    private String measureRange;

    /**
     * 使用部门
     */
    @TableField("use_dept")
    @ApiModelProperty(value = "使用部门", dataType = "String")
    private String useDept;

    /**
     * 使用人
     */
    @TableField("use_person")
    @ApiModelProperty(value = "使用人", dataType = "String")
    private String usePerson;

    /**
     * 财务净值（设备处置申请）
     */
    @TableField("financial_value")
    @ApiModelProperty(value = "财务净值（设备处置申请）", dataType = "Double")
    private Double financialValue;

    /**
     * 资产原值（设备处置申请）
     */
    @TableField("asset_origin_value")
    @ApiModelProperty(value = "资产原值（设备处置申请）", dataType = "Double")
    private Double assetOriginValue;

    /**
     * 检修结果-字典code（设备检修保养验收申请）
     */
    @TableField("overhaul_result")
    @DictCodeField(message = "检修结果不合法", cacheName = MeterDictCode.ACCEPTANCE_CHECK_RESULT)
    @ApiModelProperty(value = "检修结果-字典code（设备检修保养验收申请）", dataType = "String")
    private String overhaulResult;

    /**
     * 检修结果名称
     */
    @TableField(exist = false)
    @ApiModelProperty(value = "检修结果名称", dataType = "String")
    private String overhaulResultName;

    /**
     * 检修意见（设备检修保养验收申请）
     */
    @TableField("overhaul_idea")
    @ApiModelProperty(value = "检修意见（设备检修保养验收申请）", dataType = "String")
    private String overhaulIdea;

    /**
     * 备注
     */
    @TableField("remark")
    @ApiModelProperty(value = "备注", dataType = "String")
    private String remark;

    /**
     * 删除标记
     */
    @TableField("is_del")
    @ApiModelProperty(value = "删除标记", dataType = "Integer")
    private Integer isDel;

    /**
     * 创建人
     */
    @TableField("create_user")
    @ApiModelProperty(value = "创建人", dataType = "String")
    private String createUser;

    /**
     * 创建时间
     */
    @TableField("create_time")
    @ApiModelProperty(value = "创建时间", dataType = "String")
    private String createTime;

    /**
     * 更新时间
     */
    @TableField("update_time")
    @ApiModelProperty(value = "更新时间", dataType = "String")
    private String updateTime;

    /**
     * 设备编号
     */
    @TableField(exist = false)
    @ApiModelProperty(value = "设备编号", dataType = "String")
    private String equipmentNo;

    /**
     * 设备名称
     */
    @TableField(exist = false)
    @ApiModelProperty(value = "设备名称", dataType = "String")
    private String equipmentName;

    public EquipmentApplyEquipment() {
    }

    public EquipmentApplyEquipment(Long id, String equipmentId, Double financialValue, Double assetOriginValue) {
        this.id = id;
        this.equipmentId = equipmentId;
        this.financialValue = financialValue;
        this.assetOriginValue = assetOriginValue;
    }
}
