fork download
  1. caproject
  2.  
  3. CREATE TABLE `users` (
  4. `user_id` int NOT NULL AUTO_INCREMENT,
  5. `username` varchar(50) NOT NULL,
  6. `password` varchar(255) NOT NULL,
  7. `email` varchar(100) NOT NULL,
  8. `mobile_number` varchar(15) DEFAULT NULL,
  9. `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  10. `utr` varchar(45) DEFAULT NULL,
  11. `refer_code` varchar(45) NOT NULL,
  12. `is_subscribe` tinyint(1) NOT NULL DEFAULT '0',
  13. `class_name` varchar(45) NOT NULL,
  14. `refer_by` int DEFAULT NULL,
  15. `referno` int DEFAULT '0',
  16. PRIMARY KEY (`user_id`),
  17. UNIQUE KEY `username` (`username`),
  18. UNIQUE KEY `email` (`email`)
  19. ) ENGINE=InnoDB AUTO_INCREMENT=45 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
  20.  
  21.  
  22. CREATE TABLE `user_tokens` (
  23. `user_id` int NOT NULL,
  24. `token` varchar(255) NOT NULL,
  25. PRIMARY KEY (`user_id`)
  26. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
  27.  
  28.  
  29. CREATE TABLE `subject` (
  30. `id` int NOT NULL AUTO_INCREMENT,
  31. `subject_name` varchar(255) NOT NULL,
  32. PRIMARY KEY (`id`)
  33. ) ENGINE=InnoDB AUTO_INCREMENT=33 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
  34.  
  35.  
  36. CREATE TABLE `chapter` (
  37. `id` int NOT NULL AUTO_INCREMENT,
  38. `chapter_name` varchar(255) NOT NULL,
  39. `subject_id` int DEFAULT NULL,
  40. `questions` varchar(255) DEFAULT NULL,
  41. PRIMARY KEY (`id`),
  42. KEY `subject_id` (`subject_id`),
  43. CONSTRAINT `fk_chapter_subject` FOREIGN KEY (`subject_id`) REFERENCES `subject` (`id`)
  44. ) ENGINE=InnoDB AUTO_INCREMENT=97 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
  45.  
  46.  
  47. CREATE TABLE `formulaparts` (
  48. `id` int NOT NULL AUTO_INCREMENT,
  49. `question` longtext,
  50. `correct_answer` varchar(255) DEFAULT NULL,
  51. PRIMARY KEY (`id`)
  52. ) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
  53.  
  54.  
  55. CREATE TABLE `referamt` (
  56. `id` int NOT NULL AUTO_INCREMENT,
  57. `userupi` varchar(50) NOT NULL,
  58. `amtfortransfer` int NOT NULL,
  59. PRIMARY KEY (`id`)
  60. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
  61.  
  62.  
  63. CREATE TABLE `user_answer` (
  64. `id` int NOT NULL AUTO_INCREMENT,
  65. `user_id` int DEFAULT NULL,
  66. `question` longtext,
  67. `correct_answer` varchar(255) DEFAULT NULL,
  68. `user_answer` varchar(255) DEFAULT NULL,
  69. `attempt_no` int DEFAULT NULL,
  70. `similarity` float DEFAULT NULL,
  71. `time_current` timestamp NULL DEFAULT NULL,
  72. `test_no` int DEFAULT NULL,
  73. `subjectname` varchar(45) DEFAULT NULL,
  74. `chaptername` varchar(255) DEFAULT NULL,
  75. `date` datetime DEFAULT NULL,
  76. PRIMARY KEY (`id`),
  77. KEY `user_id` (`user_id`),
  78. CONSTRAINT `user_answer_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `users` (`user_id`)
  79. ) ENGINE=InnoDB AUTO_INCREMENT=77 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
  80.  
  81.  
  82. CREATE TABLE `user_answer_interactive` (
  83. `id` int NOT NULL AUTO_INCREMENT,
  84. `user_id` int DEFAULT NULL,
  85. `question` varchar(255) DEFAULT NULL,
  86. `correct_answer` varchar(255) DEFAULT NULL,
  87. `user_answer` varchar(255) DEFAULT NULL,
  88. `similarity` float DEFAULT NULL,
  89. `time_current` timestamp NULL DEFAULT NULL,
  90. PRIMARY KEY (`id`),
  91. KEY `user_id` (`user_id`)
  92. ) ENGINE=InnoDB AUTO_INCREMENT=508 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
  93.  
Success #stdin #stdout 0.03s 26160KB
stdin
Standard input is empty
stdout
caproject

CREATE TABLE `users` (
  `user_id` int NOT NULL AUTO_INCREMENT,
  `username` varchar(50) NOT NULL,
  `password` varchar(255) NOT NULL,
  `email` varchar(100) NOT NULL,
  `mobile_number` varchar(15) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `utr` varchar(45) DEFAULT NULL,
  `refer_code` varchar(45) NOT NULL,
  `is_subscribe` tinyint(1) NOT NULL DEFAULT '0',
  `class_name` varchar(45) NOT NULL,
  `refer_by` int DEFAULT NULL,
  `referno` int DEFAULT '0',
  PRIMARY KEY (`user_id`),
  UNIQUE KEY `username` (`username`),
  UNIQUE KEY `email` (`email`)
) ENGINE=InnoDB AUTO_INCREMENT=45 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;


CREATE TABLE `user_tokens` (
  `user_id` int NOT NULL,
  `token` varchar(255) NOT NULL,
  PRIMARY KEY (`user_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;


CREATE TABLE `subject` (
  `id` int NOT NULL AUTO_INCREMENT,
  `subject_name` varchar(255) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=33 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;


CREATE TABLE `chapter` (
  `id` int NOT NULL AUTO_INCREMENT,
  `chapter_name` varchar(255) NOT NULL,
  `subject_id` int DEFAULT NULL,
  `questions` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `subject_id` (`subject_id`),
  CONSTRAINT `fk_chapter_subject` FOREIGN KEY (`subject_id`) REFERENCES `subject` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=97 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;


CREATE TABLE `formulaparts` (
  `id` int NOT NULL AUTO_INCREMENT,
  `question` longtext,
  `correct_answer` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;


CREATE TABLE `referamt` (
  `id` int NOT NULL AUTO_INCREMENT,
  `userupi` varchar(50) NOT NULL,
  `amtfortransfer` int NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;


CREATE TABLE `user_answer` (
  `id` int NOT NULL AUTO_INCREMENT,
  `user_id` int DEFAULT NULL,
  `question` longtext,
  `correct_answer` varchar(255) DEFAULT NULL,
  `user_answer` varchar(255) DEFAULT NULL,
  `attempt_no` int DEFAULT NULL,
  `similarity` float DEFAULT NULL,
  `time_current` timestamp NULL DEFAULT NULL,
  `test_no` int DEFAULT NULL,
  `subjectname` varchar(45) DEFAULT NULL,
  `chaptername` varchar(255) DEFAULT NULL,
  `date` datetime DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `user_id` (`user_id`),
  CONSTRAINT `user_answer_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `users` (`user_id`)
) ENGINE=InnoDB AUTO_INCREMENT=77 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;


CREATE TABLE `user_answer_interactive` (
  `id` int NOT NULL AUTO_INCREMENT,
  `user_id` int DEFAULT NULL,
  `question` varchar(255) DEFAULT NULL,
  `correct_answer` varchar(255) DEFAULT NULL,
  `user_answer` varchar(255) DEFAULT NULL,
  `similarity` float DEFAULT NULL,
  `time_current` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `user_id` (`user_id`)
) ENGINE=InnoDB AUTO_INCREMENT=508 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;