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

29 lines
839 B

create table patrol_record
(
id serial,
patrol_plan_id int not null,
last_inspection_time timestamp,
inspection_time timestamp,
points jsonb,
alarm boolean default false not null,
point_id int
);
comment on column patrol_record.patrol_plan_id is '对应巡检计划的id';
comment on column patrol_record.last_inspection_time is '上次巡检时间';
comment on column patrol_record.inspection_time is '本次巡检时间';
comment on column patrol_record.points is '点位详情数组';
comment on column patrol_record.alarm is '是否异常';
comment on column patrol_record.point_id is '点位Id';
create unique index patrol_record_id_uindex
on patrol_record (id);
alter table patrol_record
add constraint patrol_record_pk
primary key (id);