
-- ./iptvchannels.xlsx





drop table if exists iptvchannels;
CREATE TABLE iptvchannels
(

  `id` VARCHAR(32)   comment '编号',
  `tv_group` VARCHAR(500)   comment '频道组',
  `tv_name` VARCHAR(500)   comment '频道名称',
  `logo_url` VARCHAR(1000)   comment '台标url',
  `url` VARCHAR(1000)   comment 'url',
  `media_type` VARCHAR(100)   comment '媒体类型',
  `download_date` VARCHAR(10)   comment '下载日期',
  `channel_delay` int   comment '频道延迟',
  `channel_grade` int   comment '频道等级',
  `del_flg` VARCHAR(1)   comment '删除标志'


,primary key(id)


)
engine=innodb 
default charset=utf8 
comment 'IPTV频道清单'
;

CREATE  INDEX iptvchannels_idx1 ON iptvchannels(tv_group);
CREATE  INDEX iptvchannels_idx2 ON iptvchannels(tv_name);
CREATE UNIQUE INDEX iptvchannels_idx3 ON iptvchannels(url);

-- ./badchannels.xlsx





drop table if exists badchannels;
CREATE TABLE badchannels
(

  `id` VARCHAR(32)   comment 'id',
  `channelid` VARCHAR(32)   comment '频道id',
  `errorcode` VARCHAR(10)   comment '错误代码'


,primary key(id)


)
engine=innodb 
default charset=utf8 
comment '坏频道'
;


-- ./device.xlsx





drop table if exists device;
CREATE TABLE device
(

  `id` VARCHAR(32)   comment 'id',
  `name` VARCHAR(255)   comment '设备名称',
  `takeover_flg` VARCHAR(1)   comment '接管标志',
  `userid` VARCHAR(32)   comment '用户id'


,primary key(id)


)
engine=innodb 
default charset=utf8 
comment '设备表'
;


