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 2023-02-23
 */
@Data
@ApiModel
@TableName("equipment_state_change_log")
public class EquipmentStateChangeLog implements Serializable {

    private static final long serialVersionUID = -5682248325901813860L;
    /**
     * 主键
     */
    @TableId("id")
    @ApiModelProperty(value = "主键", dataType = "Long")
    private Long id;

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

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

    /**
     * 管理状态-字典code
     */
    @TableField("manager_state")
    @ApiModelProperty(value = "管理状态", dataType = "String", required = false)
    @DictCodeField(message = "管理状态不合法", cacheName = MeterDictCode.MANAGER_STATE)
    private String managerState;
    /**
     * 管理状态名称
     */
    @TableField(exist = false)
    @ApiModelProperty(value = "管理状态名称", dataType = "String", required = false)
    private String managerStateName;

    /**
     * 开始时间
     */
    @TableField("start_date")
    @ApiModelProperty(value = "开始时间", dataType = "String", required = false)
    private String startDate;

    /**
     * 结束时间
     */
    @TableField("end_date")
    @ApiModelProperty(value = "结束时间", dataType = "String", required = false)
    private String endDate;

    /**
     * 申请人
     */
    @TableField("apply_person")
    @ApiModelProperty(value = "申请人", dataType = "Long", required = false)
    private Long applyPerson;

    /**
     * 申请人名称
     */
    @TableField(exist = false)
    @ApiModelProperty(value = "申请人名称", dataType = "Long", required = false)
    private String applyPersonName;

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

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

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

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

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

    public EquipmentStateChangeLog() {
    }

    public EquipmentStateChangeLog(Long applyId, Long equipmentId, String managerState, String startDate, String endDate, Long applyPerson) {
        this.applyId = applyId;
        this.equipmentId = equipmentId;
        this.managerState = managerState;
        this.startDate = startDate;
        this.endDate = endDate;
        this.applyPerson = applyPerson;
    }
}
