Device.java 1.85 KB
package vion.model;

import com.baomidou.mybatisplus.annotation.*;
import io.github.linpeilie.annotations.AutoMapper;
import io.github.linpeilie.annotations.AutoMappers;
import lombok.Data;
import vion.dto.DeviceDTO;
import vion.vo.DeviceVO;

import java.time.LocalDate;
import java.time.LocalDateTime;

/**
 * 设备表
 */
@Data
@TableName(value = "tbl_device")
@AutoMappers({
        @AutoMapper(target = DeviceVO.class),
        @AutoMapper(target = DeviceDTO.class),
})
public class Device {
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 合同编号
     */
    @TableField(value = "contract_no", condition = SqlCondition.LIKE)
    private String contractNo;

    /**
     * 设备序列号
     */
    @TableField(value = "serial_num", condition = SqlCondition.LIKE)
    private String serialNum;

    /**
     * 设备mac地址
     */
    @TableField(value = "mac", condition = SqlCondition.LIKE)
    private String mac;

    /**
     * 设备id
     */
    @TableField(value = "device_id", condition = SqlCondition.LIKE)
    private String deviceId;

    /**
     * 物料编号
     */
    @TableField(value = "material_num", condition = SqlCondition.LIKE)
    private String materialNum;

    /**
     * 生产部门
     */
    @TableField(value = "prod_sector")
    private String prodSector;

    /**
     * 状态:入库、出库、维修、借测、废弃
     */
    @TableField(value = "\"status\"")
    private Integer status;

    /**
     * 入库日期
     */
    @TableField(value = "rec_date")
    private LocalDate recDate;

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

    @TableField(value = "create_time", fill = FieldFill.INSERT)
    private LocalDateTime createTime;

    @TableField(value = "update_time", fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updateTime;
}