--
-- Table structure for table `u_sub_user`
--
-- DROP TABLE IF EXISTS `u_sub_user`;
CREATE TABLE IF NOT EXISTS `u_sub_user` (
  `id` int NOT NULL AUTO_INCREMENT COMMENT '主键',
  `imsi` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT 'SIM卡/USIM卡ID',
  `msisdn` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '用户电话号码',
  `ne_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '' COMMENT 'UDM网元标识',
  `ambr` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '' COMMENT 'SubUeAMBRTemp',
  `nssai` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '' COMMENT 'SubSNSSAITemp',
  `rat` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '' COMMENT 'rat VIRTUAL|WLAN|EUTRA|NR',
  `arfb` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '' COMMENT 'forbiddenAreasTemp',
  `sar` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '' COMMENT 'serviceAreaRestrictTemp',
  `cn` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '' COMMENT 'cnType EPC|5GC',
  `sm_data` varchar(1500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '' COMMENT 'smData',
  `smf_sel` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '' COMMENT 'smfSel',
  `eps_dat` varchar(1500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '' COMMENT 'Eps',
  `eps_flag` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '' COMMENT 'epsFlag',
  `eps_odb` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '' COMMENT 'epsOdb',
  `hplmn_odb` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '' COMMENT 'hplmnOdb',
  `ard` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '' COMMENT 'Ard',
  `epstpl` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '' COMMENT 'Epstpl',
  `context_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '' COMMENT 'ContextId',
  `apn_context` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '' COMMENT 'apnContext',
  `static_ip` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '' COMMENT 'staticIpstatic_ip指给4G UE分配的静态IP，没有可不带此字段名',
  `cag` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '' COMMENT 'CAG',
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE KEY `imsi_ne` (`imsi`,`ne_id`) USING BTREE COMMENT 'imsi_ne唯一索引'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='UDM签约用户';

-- Dump completed on 2024-03-06 17:26:59

ALTER TABLE `u_sub_user` ADD COLUMN IF NOT EXISTS `cag` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT 'CAG' AFTER `static_ip`;
ALTER TABLE `u_sub_user` MODIFY COLUMN IF NOT EXISTS `imsi` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT 'SIM卡/USIM卡ID' AFTER `id`;
ALTER TABLE `u_sub_user` MODIFY COLUMN IF NOT EXISTS `msisdn` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '用户电话号码' AFTER `imsi`;
ALTER TABLE `u_sub_user` MODIFY COLUMN IF NOT EXISTS `ne_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT 'UDM网元标识' AFTER `msisdn`;
ALTER TABLE `u_sub_user` MODIFY COLUMN IF NOT EXISTS `ambr` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT 'SubUeAMBRTemp' AFTER `ne_id`;
ALTER TABLE `u_sub_user` MODIFY COLUMN IF NOT EXISTS `nssai` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT 'SubSNSSAITemp' AFTER `ambr`;
ALTER TABLE `u_sub_user` MODIFY COLUMN IF NOT EXISTS `rat` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT 'rat VIRTUAL|WLAN|EUTRA|NR' AFTER `nssai`;
ALTER TABLE `u_sub_user` MODIFY COLUMN IF NOT EXISTS `arfb` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT 'forbiddenAreasTemp' AFTER `rat`;
ALTER TABLE `u_sub_user` MODIFY COLUMN IF NOT EXISTS `sar` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT 'serviceAreaRestrictTemp' AFTER `arfb`;
ALTER TABLE `u_sub_user` MODIFY COLUMN IF NOT EXISTS `cn` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT 'cnType EPC|5GC' AFTER `sar`;
ALTER TABLE `u_sub_user` MODIFY COLUMN IF NOT EXISTS `sm_data` varchar(1500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT 'smData' AFTER `cn`;
ALTER TABLE `u_sub_user` MODIFY COLUMN IF NOT EXISTS `smf_sel` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT 'smfSel' AFTER `sm_data`;
ALTER TABLE `u_sub_user` MODIFY COLUMN IF NOT EXISTS `eps_dat` varchar(1500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT 'Eps' AFTER `smf_sel`;
ALTER TABLE `u_sub_user` MODIFY COLUMN IF NOT EXISTS `eps_flag` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT 'epsFlag' AFTER `eps_dat`;
ALTER TABLE `u_sub_user` MODIFY COLUMN IF NOT EXISTS `eps_odb` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT 'epsOdb' AFTER `eps_flag`;
ALTER TABLE `u_sub_user` MODIFY COLUMN IF NOT EXISTS `hplmn_odb` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT 'hplmnOdb' AFTER `eps_odb`;
ALTER TABLE `u_sub_user` MODIFY COLUMN IF NOT EXISTS `ard` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT 'Ard' AFTER `hplmn_odb`;
ALTER TABLE `u_sub_user` MODIFY COLUMN IF NOT EXISTS `epstpl` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT 'Epstpl' AFTER `ard`;
ALTER TABLE `u_sub_user` MODIFY COLUMN IF NOT EXISTS `context_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT 'ContextId' AFTER `epstpl`;
ALTER TABLE `u_sub_user` MODIFY COLUMN IF NOT EXISTS `apn_context` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT 'apnContext' AFTER `context_id`;
ALTER TABLE `u_sub_user` MODIFY COLUMN IF NOT EXISTS `static_ip` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT 'staticIpstatic_ip指给4G UE分配的静态IP，没有可不带此字段名' AFTER `apn_context`;
