-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpawn_testdb_interest.sql
More file actions
65 lines (58 loc) · 8.22 KB
/
pawn_testdb_interest.sql
File metadata and controls
65 lines (58 loc) · 8.22 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
-- MySQL dump 10.13 Distrib 8.0.41, for macos15 (arm64)
--
-- Host: localhost Database: pawn_testdb
-- ------------------------------------------------------
-- Server version 9.2.0
/*!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 utf8 */;
/*!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 `interest`
--
DROP TABLE IF EXISTS `interest`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `interest` (
`InterestID` int NOT NULL AUTO_INCREMENT,
`UserID` int NOT NULL,
`CustomerID` varchar(100) DEFAULT NULL,
`PawnItemID` int DEFAULT NULL,
`FullAmount` decimal(10,2) DEFAULT NULL,
`PayAmount` decimal(10,2) DEFAULT NULL,
`Balance` decimal(10,2) DEFAULT NULL,
`DueDate` date DEFAULT ((curdate() + interval 30 day)),
`InterestDate` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (`InterestID`),
KEY `CustomerID` (`CustomerID`),
KEY `fk_interest_user` (`UserID`),
KEY `fk_interest_pawnitem` (`PawnItemID`),
CONSTRAINT `fk_interest_pawnitem` FOREIGN KEY (`PawnItemID`) REFERENCES `pawnitems` (`PawnItemID`) ON DELETE CASCADE,
CONSTRAINT `fk_interest_user` FOREIGN KEY (`UserID`) REFERENCES `users` (`UserID`) ON DELETE CASCADE,
CONSTRAINT `interest_ibfk_1` FOREIGN KEY (`CustomerID`) REFERENCES `customers` (`CustomerID`),
CONSTRAINT `interest_ibfk_2` FOREIGN KEY (`PawnItemID`) REFERENCES `pawnitems` (`PawnItemID`)
) ENGINE=InnoDB AUTO_INCREMENT=96 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `interest`
--
LOCK TABLES `interest` WRITE;
/*!40000 ALTER TABLE `interest` DISABLE KEYS */;
INSERT INTO `interest` VALUES (24,3,'CUST002',1,319.92,50000.00,0.00,'2025-03-04','2025-02-02 05:49:12'),(25,3,'CUST002',1,319.92,50000.00,0.00,'2025-03-04','2025-02-02 05:52:40'),(26,3,'CUST002',1,319.92,5000.00,0.00,'2025-03-04','2025-02-02 05:55:24'),(27,3,'CUST002',1,319.92,5000.00,0.00,'2025-03-04','2025-02-02 05:56:29'),(28,3,'CUST002',1,319.92,5000.00,0.00,'2025-03-04','2025-02-02 05:58:14'),(29,3,'CUST002',1,54680.08,54680.08,0.00,'2025-03-04','2025-02-02 06:00:45'),(30,3,'CUST002',1,54680.08,54680.08,0.00,'2025-03-04','2025-02-02 06:05:48'),(31,3,'CUST002',1,54680.08,54680.08,0.00,'2025-03-04','2025-02-02 06:09:13'),(32,3,'CUST002',1,54680.08,54680.08,0.00,'2025-03-04','2025-02-02 06:09:16'),(33,3,'CUST002',1,54680.08,54680.08,0.00,'2025-03-04','2025-02-02 06:09:20'),(34,3,'CUST002',1,54680.08,54680.08,0.00,'2025-03-04','2025-02-02 06:09:21'),(35,3,'CUST002',1,54680.08,54680.08,0.00,'2025-03-04','2025-02-02 06:09:22'),(36,3,'CUST002',1,54680.08,54680.08,0.00,'2025-03-04','2025-02-02 06:09:22'),(37,3,'CUST002',1,54680.08,54680.08,0.00,'2025-03-04','2025-02-02 06:09:22'),(38,3,'CUST002',1,54680.08,54680.08,0.00,'2025-03-04','2025-02-02 06:09:22'),(39,3,'CUST002',1,54680.08,54680.08,0.00,'2025-03-04','2025-02-02 06:09:22'),(40,3,'CUST002',1,54680.08,54680.08,0.00,'2025-03-04','2025-02-02 06:09:23'),(41,3,'CUST002',1,54680.08,54680.08,0.00,'2025-03-04','2025-02-02 06:09:23'),(42,3,'CUST002',1,54680.08,54680.08,0.00,'2025-03-04','2025-02-02 06:09:23'),(43,3,'CUST002',1,54680.08,54680.08,0.00,'2025-03-04','2025-02-02 06:09:23'),(44,3,'CUST002',5,54680.08,54680.08,0.00,'2025-03-04','2025-02-02 06:10:04'),(45,3,'CUST002',5,750438.64,750438.64,0.00,'2025-03-04','2025-02-02 06:15:01'),(46,3,'CUST002',5,750438.64,750438.64,0.00,'2025-03-04','2025-02-02 09:49:14'),(47,3,'CUST002',5,750438.64,750438.64,0.00,'2025-03-04','2025-02-02 09:49:29'),(48,3,'CUST002',5,750438.64,750438.64,0.00,'2025-03-04','2025-02-02 09:50:16'),(49,3,'CUST002',5,685118.72,685118.72,0.00,'2025-03-04','2025-02-02 09:59:44'),(50,3,'CUST002',1,685118.72,685118.72,0.00,'2025-03-04','2025-02-02 10:00:37'),(51,3,'CUST002',1,805118.72,805118.72,0.00,'2025-03-05','2025-02-03 09:04:30'),(52,3,'CUST002',1,805118.72,805118.72,0.00,'2025-03-05','2025-02-03 09:05:13'),(53,3,'CUST002',1,805118.72,805118.72,0.00,'2025-03-05','2025-02-03 09:09:06'),(54,3,'CUST002',1,805118.72,805118.72,0.00,'2025-03-05','2025-02-03 09:10:15'),(55,3,'CUST002',1,805118.72,805118.72,0.00,'2025-03-05','2025-02-03 09:11:04'),(56,3,'CUST002',1,805118.72,805118.72,0.00,'2025-03-05','2025-02-03 09:13:45'),(57,3,'CUST002',1,805118.72,805118.72,0.00,'2025-03-05','2025-02-03 09:17:56'),(58,3,'CUST002',1,805118.72,805118.72,0.00,'2025-03-05','2025-02-03 09:18:48'),(59,3,'CUST002',1,805118.72,805118.72,0.00,'2025-03-05','2025-02-03 09:19:28'),(60,3,'CUST002',1,805118.72,805118.72,0.00,'2025-03-05','2025-02-03 09:22:56'),(61,5,'200217201986',12,892.38,892.38,0.00,'2025-04-29','2025-03-30 13:07:39'),(62,5,'200217201986',12,892.38,892.38,0.00,'2025-04-29','2025-03-30 13:07:52'),(63,5,'200217201986',13,424.12,100.00,325.24,'2025-04-29','2025-03-30 13:11:09'),(64,5,'200217201986',10,3008.00,1000.00,2016.00,'2025-04-29','2025-03-30 13:13:58'),(65,5,'200217201986',10,5016.00,2016.00,3000.00,'2025-04-30','2025-03-31 14:35:25'),(66,5,'200217201986',10,6000.00,3000.00,3000.00,'2025-04-30','2025-03-31 15:10:02'),(67,5,'200217201986',10,6000.00,6000.00,0.00,'2025-04-30','2025-03-31 15:11:12'),(68,5,'200217201986',13,748.24,325.24,423.00,'2025-04-30','2025-03-31 15:22:08'),(69,5,'200217201986',13,423.00,423.00,0.00,'2025-05-01','2025-04-01 02:45:12'),(70,5,'200217201986',9,8.00,1208.00,0.00,'2025-05-01','2025-04-01 02:56:42'),(71,5,'200017701065',17,0.43,0.43,0.00,'2025-05-01','2025-04-01 02:58:42'),(72,5,'200217201986',8,805.35,100.00,705.35,'2025-05-01','2025-04-01 14:47:33'),(73,5,'200217201986',8,705.35,705.35,0.00,'2025-05-01','2025-04-01 17:43:31'),(74,7,'200217201980',19,1001.33,500.00,501.33,'2025-05-01','2025-04-01 17:48:56'),(75,7,'200217201980',19,501.33,501.33,0.00,'2025-05-02','2025-04-01 19:47:00'),(76,5,'200217201986',16,200.27,100.00,100.27,'2025-05-02','2025-04-02 17:57:14'),(77,5,'200217201986',16,0.27,0.27,0.00,'2025-05-02','2025-04-02 17:59:48'),(78,5,'200217201986',6,875.80,100.00,580.44,'2025-05-02','2025-04-02 18:01:09'),(79,5,'200217201986',6,775.80,150.00,580.44,'2025-05-02','2025-04-02 18:08:01'),(80,5,'200217201986',24,2002.67,1000.00,9.01,'2025-05-03','2025-04-03 04:28:11'),(81,5,'200217201986',24,2.67,1.00,9.01,'2025-05-03','2025-04-03 04:31:38'),(82,5,'200217201986',24,2.67,1.67,9.01,'2025-05-03','2025-04-03 04:52:02'),(83,5,'200217201986',23,900.20,100.00,4.80,'2025-05-03','2025-04-03 05:10:55'),(84,5,'200217201986',23,1.20,1.00,4.80,'2025-05-03','2025-04-03 05:19:55'),(85,5,'200217201986',23,1.20,1.00,4.80,'2025-05-03','2025-04-03 05:22:16'),(86,5,'200217201986',23,1.20,1.00,4.80,'2025-05-03','2025-04-03 12:31:47'),(87,5,'200217201986',24,2.67,1.67,9.01,'2025-05-03','2025-04-03 12:34:23'),(88,5,'200217201986',24,2.67,1.67,9.01,'2025-05-03','2025-04-03 12:35:10'),(89,5,'200217201986',6,776.96,100.00,580.44,'2025-05-03','2025-04-03 12:42:02'),(90,5,'200217201986',6,676.96,100.00,580.44,'2025-05-03','2025-04-03 12:43:48'),(91,7,'200217201980',27,997.00,100.00,897.00,'2025-06-24','2025-05-25 16:02:59'),(92,7,'200217201980',28,400.00,100.00,300.00,'2025-06-24','2025-05-25 17:34:54'),(93,7,'200217201980',28,300.00,300.00,0.00,'2025-06-24','2025-05-25 17:36:21'),(94,7,'200217201980',29,500.00,100.00,400.00,'2025-06-25','2025-05-26 04:55:39'),(95,7,'200217201980',29,400.00,400.00,0.00,'2025-06-25','2025-05-26 04:56:26');
/*!40000 ALTER TABLE `interest` 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-05-26 18:00:59