CREATE TABLE `kws_printer`
(
    `id`            bigint        NOT NULL COMMENT '主键ID',
    `ent_id`        bigint        NOT NULL COMMENT '所属企业ID',
    `printer_name`  varchar(100)  NOT NULL DEFAULT '' COMMENT '打印机名称',
    `printer_type`  varchar(50)   NOT NULL DEFAULT '' COMMENT '打印机类型',
    `useful_life`   varchar(50)   NOT NULL DEFAULT '' COMMENT '可使用寿命',
    `online_status` tinyint       NOT NULL DEFAULT 0 COMMENT '在线状态: 0-离线, 1-在线',
    `remark`        varchar(255)  NOT NULL DEFAULT '' COMMENT '备注',
    `status`        tinyint       NOT NULL DEFAULT 0 COMMENT '启停状态: 0-启用, 1-停用',
    `create_by`     bigint        NOT NULL DEFAULT 0 COMMENT '创建人',
    `create_time`   datetime      NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
    `update_by`     bigint        NOT NULL DEFAULT 0 COMMENT '更新人',
    `update_time`   datetime      NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
    `del_flag`      int           NOT NULL DEFAULT 0 COMMENT '删除标识: 0-正常, 1-删除',
    PRIMARY KEY (`id`) USING BTREE,
    UNIQUE KEY `uk_ent_printer_name_del_flag` (`ent_id`, `printer_name`, `del_flag`) USING BTREE,
    KEY `idx_create_time` (`create_time`) USING BTREE
) COMMENT ='打印机表';
