-
Notifications
You must be signed in to change notification settings - Fork 0
/
trading.sql
203 lines (170 loc) · 6.64 KB
/
trading.sql
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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
-- phpMyAdmin SQL Dump
-- version 5.2.0
-- https://www.phpmyadmin.net/
--
-- Host: localhost:3306
-- Generation Time: Jun 08, 2023 at 10:11 PM
-- Server version: 10.4.24-MariaDB
-- PHP Version: 8.1.6
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!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 */;
/*!40101 SET NAMES utf8mb4 */;
--
-- Database: `trading`
--
-- --------------------------------------------------------
--
-- Table structure for table `cart`
--
CREATE TABLE `cart` (
`id` int(11) NOT NULL,
`email` varchar(256) NOT NULL,
`identifier` text NOT NULL,
`symbol` varchar(256) NOT NULL,
`price` bigint(11) NOT NULL,
`created_at` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
-- --------------------------------------------------------
--
-- Table structure for table `transactions`
--
CREATE TABLE `transactions` (
`id` int(11) NOT NULL,
`email` varchar(256) NOT NULL,
`identifier` varchar(256) NOT NULL,
`quantity` int(11) NOT NULL DEFAULT 1,
`stock_price` double NOT NULL,
`transaction_amt` bigint(20) NOT NULL,
`status` int(11) NOT NULL DEFAULT 0,
`created_at` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
--
-- Dumping data for table `transactions`
--
INSERT INTO `transactions` (`id`, `email`, `identifier`, `quantity`, `stock_price`, `transaction_amt`, `status`, `created_at`) VALUES
(26, '[email protected]', '', 0, 0, 18725, 1, '2023-06-08 17:11:46'),
(27, '[email protected]', '', 0, 0, 187250, 1, '2023-06-08 17:49:01'),
(28, '[email protected]', '', 0, 0, 187250, 1, '2023-06-08 18:27:00'),
(29, '[email protected]', '', 0, 0, 187250, 1, '2023-06-08 18:30:35'),
(30, '[email protected]', '', 0, 0, 297800, 1, '2023-06-08 18:35:06'),
(31, '[email protected]', '', 0, 0, 2978000, 1, '2023-06-08 18:35:32'),
(32, '[email protected]', '', 0, 0, 297800, 1, '2023-06-08 18:38:20'),
(33, '[email protected]', '', 0, 0, 29780, 1, '2023-06-08 18:55:56'),
(34, '[email protected]', '', 1, 0, 21042, 0, '2023-06-08 19:22:35'),
(35, '[email protected]', '', 1, 0, 297800, 1, '2023-06-08 19:24:14'),
(36, '[email protected]', '', 1, 0, 2978, 1, '2023-06-08 19:30:07'),
(37, '[email protected]', '', 1, 0, 2978, 1, '2023-06-08 19:37:02'),
(38, '', 'HEROMOTOCOEQN', 1, 0, 0, 1, '2023-06-08 19:37:02'),
(39, '[email protected]', '', 1, 0, 2317, 1, '2023-06-08 19:41:15'),
(40, '[email protected]', '', 1, 0, 2317, 1, '2023-06-08 19:43:25'),
(41, '[email protected]', '', 1, 0, 21042, 1, '2023-06-08 20:10:58'),
(42, '[email protected]', 'NIFTY 50', 1, 18725, 21042, 0, '2023-06-08 20:10:58'),
(43, '[email protected]', 'LTEQN', 1, 2317, 21042, 0, '2023-06-08 20:10:58');
-- --------------------------------------------------------
--
-- Table structure for table `users`
--
CREATE TABLE `users` (
`id` int(11) NOT NULL,
`first_name` varchar(50) NOT NULL,
`last_name` varchar(50) NOT NULL,
`email` varchar(256) NOT NULL,
`phone` bigint(10) DEFAULT NULL,
`password` varchar(256) NOT NULL,
`created_at` timestamp NOT NULL DEFAULT current_timestamp(),
`updated_at` datetime NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
`ip` varchar(100) NOT NULL,
`auth` int(11) NOT NULL DEFAULT 0,
`connect` varchar(256) NOT NULL,
`balance` bigint(20) NOT NULL DEFAULT 100000
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
--
-- Dumping data for table `users`
--
INSERT INTO `users` (`id`, `first_name`, `last_name`, `email`, `phone`, `password`, `created_at`, `updated_at`, `ip`, `auth`, `connect`, `balance`) VALUES
(9, 'test', 'raja', '[email protected]', 123, '12', '2023-06-07 14:13:59', '2023-06-09 01:40:58', '::1', 1, '1', 46200),
(10, 'Kartikeya', 'Saini', '[email protected]', NULL, '12', '2023-06-08 04:36:11', '2023-06-08 10:06:11', '', 1, '', 100000);
-- --------------------------------------------------------
--
-- Table structure for table `user_details`
--
CREATE TABLE `user_details` (
`id` int(11) NOT NULL,
`email` text NOT NULL,
`updated_at` datetime NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
`access_type` varchar(100) NOT NULL DEFAULT 'Login',
`ip` varchar(256) NOT NULL,
`status` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
--
-- Dumping data for table `user_details`
--
INSERT INTO `user_details` (`id`, `email`, `updated_at`, `access_type`, `ip`, `status`) VALUES
(10, '[email protected]', '2023-06-08 08:51:42', 'Login', '::1', 0),
(11, '[email protected]', '2023-06-08 08:57:43', 'Login', '::1', 0),
(12, '[email protected]', '2023-06-08 09:10:03', 'Login', '::1', 0),
(13, '[email protected]', '2023-06-08 09:18:22', 'Login', '::1', 0),
(14, '[email protected]', '2023-06-08 09:59:39', 'Login', '::1', 0),
(15, '[email protected]', '2023-06-08 10:35:04', 'Login', '::1', 0),
(16, '[email protected]', '2023-06-08 11:41:49', 'Login', '::1', 0),
(17, '[email protected]', '2023-06-08 11:42:05', 'Login', '::1', 0),
(18, '[email protected]', '2023-06-08 14:09:56', 'Login', '::1', 0),
(19, '[email protected]', '2023-06-08 14:12:45', 'Login', '::1', 0),
(20, '[email protected]', '2023-06-08 16:12:25', 'Login', '::1', 0),
(21, '[email protected]', '2023-06-08 21:19:22', 'Login', '::1', 0),
(22, '[email protected]', '2023-06-08 22:05:25', 'Login', '::1', 0),
(23, '[email protected]', '2023-06-08 22:05:37', 'Login', '::1', 1);
--
-- Indexes for dumped tables
--
--
-- Indexes for table `cart`
--
ALTER TABLE `cart`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `transactions`
--
ALTER TABLE `transactions`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `users`
--
ALTER TABLE `users`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `user_details`
--
ALTER TABLE `user_details`
ADD PRIMARY KEY (`id`);
--
-- AUTO_INCREMENT for dumped tables
--
--
-- AUTO_INCREMENT for table `cart`
--
ALTER TABLE `cart`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=38;
--
-- AUTO_INCREMENT for table `transactions`
--
ALTER TABLE `transactions`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=44;
--
-- AUTO_INCREMENT for table `users`
--
ALTER TABLE `users`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=11;
--
-- AUTO_INCREMENT for table `user_details`
--
ALTER TABLE `user_details`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=24;
COMMIT;
/*!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 */;