20260909_water_agent.sql 719 B

12345678910111213141516
  1. CREATE TABLE IF NOT EXISTS `sa_water_agent` (
  2. `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  3. `user_id` int unsigned DEFAULT NULL COMMENT '迁移来源账号,不自动授予供水权限',
  4. `name` varchar(120) NOT NULL,
  5. `contact` varchar(60) NOT NULL,
  6. `phone` varchar(30) NOT NULL,
  7. `region` varchar(160) NOT NULL DEFAULT '',
  8. `address` varchar(255) NOT NULL DEFAULT '',
  9. `status` tinyint NOT NULL DEFAULT 1,
  10. `contract_urls` json DEFAULT NULL,
  11. `identity_urls` json DEFAULT NULL,
  12. `extra_urls` json DEFAULT NULL,
  13. `created_at` datetime NOT NULL,
  14. `updated_at` datetime NOT NULL,
  15. PRIMARY KEY (`id`), UNIQUE KEY `uk_water_agent_user` (`user_id`)
  16. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='供水代理档案';