# 维修记录附件表 create table uav_repair_attachment ( id int primary key auto_increment comment '主键id', repair_uni_id int not null comment '维修记录工单号', attachment_type tinyint unsigned not null comment '附件类型, enum: 0-维修现场照片, 1-更换部件信息图片, 2-维修测试报告, 3-纸质维修记录表单图片, 255-其他', file_name varchar(128) not null comment '文件名', file_download_path varchar(200) not null comment '文件路径', file_size int comment '文件大小(字节)', upload_time datetime not null comment '上传时间', note varchar(200) comment '备注', create_time datetime, update_time datetime, index idx_repair_id (repair_uni_id), foreign key (repair_uni_id) references uav_repair_record (id) ) comment '维修记录附件表';