diff --git a/src/main/java/com/glxp/api/dao/inv/DeviceAssetUsageMapper.java b/src/main/java/com/glxp/api/dao/inv/DeviceAssetUsageMapper.java new file mode 100644 index 00000000..f6077056 --- /dev/null +++ b/src/main/java/com/glxp/api/dao/inv/DeviceAssetUsageMapper.java @@ -0,0 +1,9 @@ +package com.glxp.api.dao.inv; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.glxp.api.entity.inv.DeviceAssetUsageEntity; +import org.apache.ibatis.annotations.Mapper; + +@Mapper +public interface DeviceAssetUsageMapper extends BaseMapper { +} diff --git a/src/main/java/com/glxp/api/entity/inv/DeviceAssetUsageEntity.java b/src/main/java/com/glxp/api/entity/inv/DeviceAssetUsageEntity.java new file mode 100644 index 00000000..c96e6583 --- /dev/null +++ b/src/main/java/com/glxp/api/entity/inv/DeviceAssetUsageEntity.java @@ -0,0 +1,75 @@ +package com.glxp.api.entity.inv; + +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 java.io.Serializable; +import java.util.Date; +import lombok.Data; + +@Data +@TableName(value = "device_asset_usage") +public class DeviceAssetUsageEntity implements Serializable { + /** + * 雪花ID + */ + @TableId(value = "id", type = IdType.INPUT) + private Long id; + + /** + * 使用记录号 + */ + @TableField(value = "code") + private String code; + + /** + * 使用人 + */ + @TableField(value = "`user`") + private String user; + + /** + * 开始时间 + */ + @TableField(value = "startTime") + private Date startTime; + + /** + * 结束时间 + */ + @TableField(value = "endTime") + private Date endTime; + + /** + * 备注 + */ + @TableField(value = "remark") + private String remark; + + /** + * 创建人 + */ + @TableField(value = "`createUser`") + private String createUser; + + /** + * 创建时间 + */ + @TableField(value = "createTime") + private Date createTime; + + /** + * 更新人 + */ + @TableField(value = "updateUser") + private String updateUser; + + /** + * 更新时间 + */ + @TableField(value = "updateTime") + private Date updateTime; + + private static final long serialVersionUID = 1L; +} diff --git a/src/main/java/com/glxp/api/service/inv/DeviceAssetUsageService.java b/src/main/java/com/glxp/api/service/inv/DeviceAssetUsageService.java new file mode 100644 index 00000000..3ed804b1 --- /dev/null +++ b/src/main/java/com/glxp/api/service/inv/DeviceAssetUsageService.java @@ -0,0 +1,10 @@ +package com.glxp.api.service.inv; + +import org.springframework.stereotype.Service; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.glxp.api.dao.inv.DeviceAssetUsageMapper; +import com.glxp.api.entity.inv.DeviceAssetUsageEntity; +@Service +public class DeviceAssetUsageService extends ServiceImpl { + +} diff --git a/src/main/resources/mybatis/mapper/inv/DeviceAssetUsageMapper.xml b/src/main/resources/mybatis/mapper/inv/DeviceAssetUsageMapper.xml new file mode 100644 index 00000000..1847a189 --- /dev/null +++ b/src/main/resources/mybatis/mapper/inv/DeviceAssetUsageMapper.xml @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + + + + + + + id, code, `user`, startTime, endTime, remark, `createUser`, createTime, updateUser, + updateTime + + diff --git a/src/main/resources/schemas/schema_v2.2.sql b/src/main/resources/schemas/schema_v2.2.sql index e243e5d4..6ba6201a 100644 --- a/src/main/resources/schemas/schema_v2.2.sql +++ b/src/main/resources/schemas/schema_v2.2.sql @@ -223,3 +223,18 @@ CREATE TABLE IF NOT EXISTS `device_asset_user` ( `updateTime` datetime(0) NULL DEFAULT NULL COMMENT '更新时间', PRIMARY KEY (`id`) USING BTREE ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci ROW_FORMAT = Dynamic; + + +CREATE TABLE IF NOT EXISTS `device_asset_usage` ( + `id` bigint NOT NULL COMMENT '雪花ID', + `code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '使用记录号', + `user` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '使用人', + `startTime` datetime(0) NULL DEFAULT NULL COMMENT '开始时间', + `endTime` datetime(0) NULL DEFAULT NULL COMMENT '结束时间', + `remark` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '备注', + `createUser` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '创建人', + `createTime` datetime(0) NULL DEFAULT NULL COMMENT '创建时间', + `updateUser` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '更新人', + `updateTime` datetime(0) NULL DEFAULT NULL COMMENT '更新时间', + PRIMARY KEY (`id`) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci ROW_FORMAT = Dynamic;