-- MySQL dump 10.13  Distrib 8.0.40, for Linux (x86_64)
--
-- Host: localhost    Database: happy_paradise
-- ------------------------------------------------------
-- Server version	8.0.40-0ubuntu0.22.04.1

/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!50503 SET NAMES utf8mb4 */;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;

--
-- Table structure for table `provider_payment_methods`
--

DROP TABLE IF EXISTS `provider_payment_methods`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `provider_payment_methods` (
  `uid` int unsigned NOT NULL AUTO_INCREMENT COMMENT '自動遞增的整數',
  `provider_id` varchar(45) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '第三方金流提供商的唯一標識符',
  `method_id` int unsigned NOT NULL COMMENT '支付方式的唯一標識符',
  `is_payment_enabled` tinyint(1) NOT NULL DEFAULT '0' COMMENT '支付金流功能是否启用',
  `is_withdrawal_enabled` tinyint(1) DEFAULT '0' COMMENT '提款功能開啟',
  `min_deposit` double(30,8) NOT NULL COMMENT '此支付方式的最小存款限額',
  `max_deposit` double(30,8) NOT NULL COMMENT '此支付方式的最大存款限額',
  `priority` int NOT NULL COMMENT '支付方式的优先级，1为最优先',
  `memo` text COLLATE utf8mb4_unicode_ci COMMENT '备注信息',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`uid`),
  UNIQUE KEY `provider_method_unique` (`provider_id`,`method_id`),
  UNIQUE KEY `method_priority_unique` (`method_id`,`priority`),
  CONSTRAINT `provider_payment_methods_method_id_foreign` FOREIGN KEY (`method_id`) REFERENCES `payment_methods` (`method_id`) ON DELETE CASCADE,
  CONSTRAINT `provider_payment_methods_provider_id_foreign` FOREIGN KEY (`provider_id`) REFERENCES `third_party_providers` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='金流商支付設定資料表';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `provider_payment_methods`
--

LOCK TABLES `provider_payment_methods` WRITE;
/*!40000 ALTER TABLE `provider_payment_methods` DISABLE KEYS */;
REPLACE INTO `provider_payment_methods` VALUES (2,'GREATPAY-TWD',3,0,0,500.00000000,20000.00000000,1,NULL,'2024-10-18 02:48:29','2024-11-12 05:23:09'),(4,'MMPAY-TWD',3,1,0,500.00000000,20000.00000000,2,NULL,'2024-12-24 01:34:45','2025-01-06 08:58:28'),(5,'MMPAY-TWD',4,1,0,500.00000000,20000.00000000,1,NULL,'2024-12-25 01:37:11','2024-12-25 01:37:21'),(6,'USDTPAY-USDT',2,1,0,1.00000000,3000.00000000,1,NULL,'2025-01-06 07:57:02','2025-01-10 01:45:51');
/*!40000 ALTER TABLE `provider_payment_methods` ENABLE KEYS */;
UNLOCK TABLES;
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;

/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;

-- Dump completed on 2025-01-20 19:22:29
