create table iot_event
(
    id bigint not null
        constraint iot_event_pk
            primary key,
    product_id bigint,
    type       integer,
    identifier varchar,
    name       varchar,
    remark  varchar,
    dept_id bigint
);

comment on table iot_event is '物模型服务';

comment on column iot_event.id is '主键';

comment on column iot_event.product_id is '设备ID';

comment on column iot_event.type is '事件类型';

comment on column iot_event.identifier is '标识';

comment on column iot_event.name is '名称';

comment on column iot_event.remark is '备注';

comment on column iot_event.dept_id is '部门权限id';

alter table iot_event
    owner to gitea;

