create table if not exists `app_group` ( id int unsigned primary key not null auto_increment, name varchar(100) comment '名称', order_num int comment '顺序' ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='应用组'; create table if not exists `app_config` ( id int unsigned primary key not null auto_increment, group_id int not null, name varchar(100) comment '名称', icon varchar(100) comment '图标', order_num int comment '顺序', view_type int default 0 comment '视图类型 0 - widget, 1 - web', android_widget varchar(100) comment 'android控件', ios_widget varchar(100) comment 'ios控件', web_url varchar(300) comment '网页', scope_platform int default 0 comment '专属平台的应用 0 -ALL', scope_company_id bigint comment '专属企业的应用' ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='应用组'; create table if not exists `app_company` ( app_id int not null comment 'app_config.id', company_id bigint not null comment 'ac_company.id' ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='企业应用绑定';