DROP TABLE IF EXISTS `user_role`;
CREATE TABLE `user_role` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `native_code` int(11) NOT NULL COMMENT '数据区域',
  `active` bit(1) NOT NULL COMMENT '是否有效',
  `create_time` datetime NOT NULL,
  `update_time` datetime NOT NULL,
  `update_by` varchar(50) NOT NULL,    
  `roleid` int(11) DEFAULT NULL COMMENT '角色ID',
  `userid` int(11) DEFAULT NULL COMMENT '用户id',
  PRIMARY KEY (`id`),
  KEY `idx_id` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=560 DEFAULT CHARSET=utf8;