Update: 2026-06-10 02:44:54
This commit is contained in:
@@ -1782,3 +1782,45 @@ CREATE TABLE `write_argument_after_applied_from_background` (
|
||||
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
|
||||
|
||||
-- Dump completed on 2026-04-22 19:40:54
|
||||
|
||||
--
|
||||
-- Table structure for table `user_referral_codes`
|
||||
--
|
||||
CREATE TABLE IF NOT EXISTS `user_referral_codes` (
|
||||
`id` int NOT NULL AUTO_INCREMENT,
|
||||
`user_id` varchar(100) NOT NULL,
|
||||
`user_type` enum('driver','passenger') NOT NULL,
|
||||
`referral_code` varchar(20) NOT NULL UNIQUE,
|
||||
`created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
|
||||
|
||||
--
|
||||
-- Table structure for table `unified_referrals`
|
||||
--
|
||||
CREATE TABLE IF NOT EXISTS `unified_referrals` (
|
||||
`id` int NOT NULL AUTO_INCREMENT,
|
||||
`inviter_code` varchar(20) NOT NULL,
|
||||
`invited_user_id` varchar(100) NOT NULL,
|
||||
`invited_user_type` enum('driver','passenger') NOT NULL,
|
||||
`status` enum('registered','first_trip','claimed') DEFAULT 'registered',
|
||||
`trip_count` int DEFAULT 0,
|
||||
`is_reward_claimed` tinyint(1) DEFAULT 0,
|
||||
`created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
`updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
|
||||
|
||||
--
|
||||
-- Table structure for table `driver_cash_claims`
|
||||
--
|
||||
CREATE TABLE IF NOT EXISTS `driver_cash_claims` (
|
||||
`id` int NOT NULL AUTO_INCREMENT,
|
||||
`driver_id` varchar(100) NOT NULL,
|
||||
`referral_id` int NOT NULL,
|
||||
`amount_syp` decimal(10,2) NOT NULL,
|
||||
`status` enum('pending','paid','rejected') DEFAULT 'pending',
|
||||
`created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
`updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
|
||||
|
||||
Reference in New Issue
Block a user