package com.ruoyi.demo.entity; 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.ruoyi.demo.entity.vo.EquipmentVo; import lombok.Data; import lombok.NoArgsConstructor; import java.math.BigDecimal; import java.time.LocalDateTime; @Data @TableName("dl_equipment") @NoArgsConstructor public class Equipment { @TableId(value = "equipment_id",type = IdType.ASSIGN_ID) private String equipmentId; @TableField("equipment_name") private String equipmentName; @TableField("equipment_code") private String equipmentCode; @TableField("addr_info") private String addrInfo; @TableField("addr_code") private String addrCode; @TableField("addr_code_info") private String addrCodeInfo; @TableField("lat") private BigDecimal lat; @TableField("lng") private BigDecimal lng; @TableField("state") private Integer state; @TableField("on_state") private Integer onState; @TableField("store_id") private String storeId; @TableField("manufacturers") private String manufacturers; @TableField("maintain_name") private String maintainName; @TableField("maintain_telephone") private String maintainTelephone; @TableField("annotation") private String annotation; @TableField("enter_time") private LocalDateTime enterTime; @TableField("update_time") private LocalDateTime updateTime; @TableField("deleted") private Integer deleted; public Equipment(EquipmentVo equipmentVo) { this.equipmentName = equipmentVo.getEquipmentName(); this.equipmentCode = equipmentVo.getEquipmentCode(); this.addrInfo = equipmentVo.getAddrInfo(); this.addrCode = equipmentVo.getAddrCode(); this.lat = equipmentVo.getLat(); this.lng = equipmentVo.getLng(); this.state = equipmentVo.getState(); this.onState = equipmentVo.getOnState(); this.storeId = equipmentVo.getStoreId(); this.manufacturers = equipmentVo.getManufacturers(); this.maintainName = equipmentVo.getMaintainName(); this.maintainTelephone = equipmentVo.getMaintainTelephone(); this.annotation = equipmentVo.getAnnotation(); } }