You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

14 lines
781 B
MySQL

1 month ago
# 无人机与标签的映射表
drop table if exists uav_label_mapping;
create table if not exists uav_label_mapping
(
id bigint unsigned not null primary key auto_increment comment '主键id',
uav_id bigint unsigned not null comment '无人机id',
label_id bigint unsigned not null comment '标签id',
is_delete tinyint not null default 0 comment '是否删除, 0-否, 1-是',
create_time datetime comment '打标签时间',
update_time datetime comment '更新时间',
# foreign key (uav_basic_info_id) references uav_basic_info (id), # TODO : 删除
# foreign key (label_id) references label (id), # TODO : 删除
unique key unique_uav_label (uav_id, label_id, is_delete)
) comment '无人机与标签的映射表';