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_use_log")
public class EquipmentUseLog 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;

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

    /**
     * 使用部门名称
     */
    @TableField(exist = false)
    @ApiModelProperty(value = "使用部门名称", dataType = "String")
    private String useDeptName;

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

    /**
     * 使用人名称
     */
    @ApiModelProperty(value = "使用人名称", dataType = "String")
    private String usePersonName;

    /**
     * 使用类型
     */
    @TableField("use_type")
    @ApiModelProperty(value = "使用类型", dataType = "String", required = false)
    @DictCodeField(message = "使用类型不合法", cacheName = MeterDictCode.EQUIPMENT_APPLY_PROCESS_RESULT)
    private String useType;
    /**
     * 管理状态名称
     */
    @TableField(exist = false)
    @ApiModelProperty(value = "管理状态名称", dataType = "String", required = false)
    private String useTypeName;

    /**
     * 开始时间
     */
    @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("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 EquipmentUseLog(Long applyId, Long equipmentId, Long useDept, Long usePerson, String useType, String startDate, String endDate) {
        this.applyId = applyId;
        this.equipmentId = equipmentId;
        this.useDept = useDept;
        this.usePerson = usePerson;
        this.useType = useType;
        this.startDate = startDate;
        this.endDate = endDate;
    }

    public EquipmentUseLog() {
    }
}
