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.

30 lines
985 B

create table if not exists camera_status_alarm
(
id serial not null,
status_id integer not null,
description varchar(1024),
confirm varchar(1024),
confirm_time timestamp with time zone,
create_time timestamp with time zone,
update_time timestamp with time zone,
camera_id integer,
constraint camera_status_alarm_pk
primary key (id),
constraint camera_status_alarm_camera_status_id_fk
foreign key (status_id) references camera_status,
constraint camera_status_alarm_camera_id_fk
foreign key (camera_id) references camera
);
comment on column camera_status_alarm.description is '描述';
comment on column camera_status_alarm.confirm is '确认信息';
comment on column camera_status_alarm.create_time is '生成时间';
comment on column camera_status_alarm.update_time is '更新时间';
create unique index if not exists camera_status_alarm_id_uindex
on camera_status_alarm (id);