DROP TABLE IF EXISTS `passenger_equipment`;
CREATE TABLE `passenger_equipment`
(
    `id`           BIGINT(20) NOT NULL COMMENT 'ID',
    `data_type`    INT(11) NULL DEFAULT NULL COMMENT '点位类型',
    `bz_id`        BIGINT(20) NULL DEFAULT NULL COMMENT '点位分布',
    `brief`        VARCHAR(500) NULL DEFAULT NULL COMMENT '说明',
    `litpics`      VARCHAR(500) NULL DEFAULT NULL COMMENT '图片',
    `created_time` DATETIME NULL DEFAULT NULL COMMENT '创建时间',
    `created_by`   BIGINT(20) NULL DEFAULT NULL COMMENT '创建人',
    `updated_time` DATETIME NULL DEFAULT NULL COMMENT '修改时间',
    `updated_by`   BIGINT(20) NULL DEFAULT NULL COMMENT '修改人',
    PRIMARY KEY (`id`)
) COMMENT ='人流设备点位分布信息' ENGINE = InnoDB;

DROP TABLE IF EXISTS `passenger_equipment_people`;
CREATE TABLE `passenger_equipment_people`
(
    `id`             BIGINT(20) NOT NULL COMMENT 'ID',
    `equipment_id`   BIGINT(20) NULL DEFAULT NULL COMMENT '设备ID',
    `face_id`        VARCHAR(32) NULL DEFAULT NULL COMMENT '面容ID',
    `in_time`        DATETIME NULL DEFAULT NULL COMMENT '进入时间',
    `out_time`       DATETIME NULL DEFAULT NULL COMMENT '离开时间',
    `gender`         INT(1) NULL DEFAULT NULL COMMENT '性别',
    `from_source`    VARCHAR(32) NULL DEFAULT NULL COMMENT '来源地区',
    `retention_time` INT(11) NULL DEFAULT NULL COMMENT '停留时间',
    PRIMARY KEY (`id`)
) COMMENT ='人流监测详细数据信息' ENGINE = InnoDB;


REPLACE
INTO `authority_info` (`id`, `parent_id`, `name`, `remark`)
VALUES (2000, 0, 'bz.passenger.equipment', '客户监控设备管理'),
       (2001, 2000, 'bz.passenger.equipment.find', '查询'),
       (2002, 2000, 'bz.passenger.equipment.add', '添加'),
       (2003, 2000, 'bz.passenger.equipment.edit', '修改'),
       (2004, 2000, 'bz.passenger.equipment.delete', '删除');
