Files
klp-oa/klp-oa/klp-admin/src/main/resources/db/migration/V3__newSql.sql
2025-11-11 22:03:30 +08:00

32 lines
2.3 KiB
SQL
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

-- auto-generated definition
CREATE TABLE dv_special_equipment
(
equipment_id BIGINT NOT NULL COMMENT '设备ID'
PRIMARY KEY,
equipment_code VARCHAR(64) NOT NULL COMMENT '设备编码',
equipment_name VARCHAR(255) NOT NULL COMMENT '设备名称(如:锅炉、压力容器、压力管道、电梯、起重机械等)',
specification_model VARCHAR(255) NULL COMMENT '规格型号',
manufacturer VARCHAR(255) NULL COMMENT '制造单位',
production_date DATE NULL COMMENT '制造日期',
installation_date DATE NULL COMMENT '安装日期',
use_start_date DATE NULL COMMENT '投入使用日期',
registration_no VARCHAR(64) NULL COMMENT '特种设备注册编号',
safety_manager VARCHAR(64) NULL COMMENT '安全负责人',
attachment TEXT NULL COMMENT '附件路径(多个附件用逗号分隔)',
inspection_cycle INT NOT NULL COMMENT '检验周期(月)',
last_inspection_time DATETIME NULL COMMENT '上次检验时间',
next_inspection_time DATETIME NULL COMMENT '下次检验时间',
current_status VARCHAR(32) NULL COMMENT '当前状态(在用、停用、报废等)',
remark VARCHAR(500) DEFAULT '' NULL COMMENT '备注',
del_flag tinyint(1) default 0 not null comment '删除标志0=正常1=已删除)',
create_by VARCHAR(64) DEFAULT '' NULL COMMENT '创建者',
create_time DATETIME NULL COMMENT '创建时间',
update_by VARCHAR(64) DEFAULT '' NULL COMMENT '更新者',
update_time DATETIME NULL COMMENT '更新时间',
INDEX idx_equipment_code (equipment_code),
INDEX idx_equipment_type (equipment_name),
INDEX idx_next_inspection (next_inspection_time),
INDEX idx_safety_manager (safety_manager)
)
COMMENT '特种设备表(包含锅炉、压力管道、电梯等特种设备信息)' CHARSET = utf8mb4;