-
Notifications
You must be signed in to change notification settings - Fork 0
/
localhost.sql
210 lines (185 loc) · 6.65 KB
/
localhost.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
204
205
206
207
208
209
210
--
-- Table structure for table `members`
--
-- Assumptions for role
-- 1 for admin
-- 2 for employee
CREATE TABLE IF NOT EXISTS members (
id INT(11) NOT NULL AUTO_INCREMENT,
firstName VARCHAR(50) NOT NULL,
lastName VARCHAR(50) NOT NULL,
email VARCHAR(50) NOT NULL,
username VARCHAR(15) NOT NULL,
password CHAR(128) NOT NULL,
role INT(1) NOT NULL,
PRIMARY KEY (id)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
--
-- Dumping data into table `members`
--
INSERT INTO `members` (`id`, `firstName`, `lastName`, `email`, `username`, `password`, `role`)
VALUES (NULL, 'admin', 'admin', '[email protected]', 'admin', '$2y$10$Vf14qRLy18AKDr66yOuAq.FkBgAuIgtd0zQAK0CdaqA2txw2CmVAu', '1');
--
-- Table structure for table `states`
--
CREATE TABLE states (
id int(11) NOT NULL auto_increment,
code varchar(2) NOT NULL default '',
name varchar(100) NOT NULL default '',
PRIMARY KEY (id)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1;
--
-- Dumping data for table `states`
--
INSERT INTO `states` VALUES (null, 'AN', 'Andaman and Nicobar Islands');
INSERT INTO `states` VALUES (null, 'AP', 'Andhra Pradesh');
INSERT INTO `states` VALUES (null, 'AR', 'Arunachal Pradesh');
INSERT INTO `states` VALUES (null, 'AS', 'Assam');
INSERT INTO `states` VALUES (null, 'BR', 'Bihar');
INSERT INTO `states` VALUES (null, 'CH', 'Chandigarh');
INSERT INTO `states` VALUES (null, 'CT', 'Chhattisgarh');
INSERT INTO `states` VALUES (null, 'DN', 'Dadra and Nagar Haveli');
INSERT INTO `states` VALUES (null, 'DD', 'Daman and Diu');
INSERT INTO `states` VALUES (null, 'DL', 'Delhi');
INSERT INTO `states` VALUES (null, 'GA', 'Goa');
INSERT INTO `states` VALUES (null, 'GJ', 'Gujarat');
INSERT INTO `states` VALUES (null, 'HR', 'Haryana');
INSERT INTO `states` VALUES (null, 'HP', 'Himachal Pradesh');
INSERT INTO `states` VALUES (null, 'JK', 'Jammu and Kashmir');
INSERT INTO `states` VALUES (null, 'JH', 'Jharkhand');
INSERT INTO `states` VALUES (null, 'KA', 'Karnataka');
INSERT INTO `states` VALUES (null, 'KL', 'Kerala');
INSERT INTO `states` VALUES (null, 'LD', 'Lakshadweep');
INSERT INTO `states` VALUES (null, 'MP', 'Madhya Pradesh');
INSERT INTO `states` VALUES (null, 'MH', 'Maharashtra');
INSERT INTO `states` VALUES (null, 'MN', 'Manipur');
INSERT INTO `states` VALUES (null, 'ML', 'Meghalaya');
INSERT INTO `states` VALUES (null, 'MZ', 'Mizoram');
INSERT INTO `states` VALUES (null, 'OR', 'Odisha, Orissa');
INSERT INTO `states` VALUES (null, 'PY', 'Puducherry');
INSERT INTO `states` VALUES (null, 'PB', 'Punjab');
INSERT INTO `states` VALUES (null, 'RJ', 'Rajasthan');
INSERT INTO `states` VALUES (null, 'SK', 'Sikkim');
INSERT INTO `states` VALUES (null, 'TN', 'Tamil Nadu');
INSERT INTO `states` VALUES (null, 'TG', 'Telangana');
INSERT INTO `states` VALUES (null, 'TR', 'Tripura');
INSERT INTO `states` VALUES (null, 'UP', 'Uttar Pradesh');
INSERT INTO `states` VALUES (null, 'UT', 'Uttarakhand,Uttaranchal');
INSERT INTO `states` VALUES (null, 'WB', 'West Bengal');
--
-- Table structure for table `customers`
--
CREATE TABLE IF NOT EXISTS customers (
id INT(11) NOT NULL AUTO_INCREMENT,
firstName VARCHAR(50) NOT NULL,
lastName VARCHAR(50) NOT NULL,
email VARCHAR(50) NOT NULL,
mobNo BIGINT(15) NOT NULL,
stateId INT(11) NOT NULL,
gst VARCHAR(15) NOT NULL,
pan VARCHAR(10) NOT NULL,
deliveryAddr VARCHAR(500) NOT NULL,
creationDate VARCHAR(30) NOT NULL,
updationDate VARCHAR(30) NOT NULL,
isDeleted INT(1) NOT NULL DEFAULT 0,
PRIMARY KEY (id)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
--
-- Table structure for table `quotations`
--
CREATE TABLE IF NOT EXISTS quotations (
id INT(11) NOT NULL AUTO_INCREMENT,
item VARCHAR(100) NOT NULL,
itemDesc VARCHAR(500) NOT NULL,
quantity INT(11) NOT NULL,
customerId INT(11) NOT NULL,
rate VARCHAR(10) NOT NULL,
tnc VARCHAR(500) NOT NULL,
deliveryTime INT(11) NOT NULL,
cgst VARCHAR(10) NOT NULL,
sgst VARCHAR(10) NOT NULL,
igst VARCHAR(10) NOT NULL,
orderValue INT(11) NOT NULL,
creationDate VARCHAR(30) NOT NULL,
updationDate VARCHAR(30) NOT NULL,
status INT(11) NOT NULL,
isDeleted INT(1) NOT NULL DEFAULT 0,
PRIMARY KEY (id)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
--
-- Table structure for table `orders`
--
CREATE TABLE IF NOT EXISTS orders (
id INT(11) NOT NULL AUTO_INCREMENT,
quotId INT(11) NOT NULL,
status INT(11) NOT NULL,
creationDate VARCHAR(30) NOT NULL,
updationDate VARCHAR(30) NOT NULL,
isDeleted INT(1) NOT NULL DEFAULT 0,
PRIMARY KEY (id)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
--
-- Table structure for table `quotCmts`
--
CREATE TABLE IF NOT EXISTS quotCmts (
id INT(11) NOT NULL AUTO_INCREMENT,
quotId INT(11) NOT NULL,
comments VARCHAR(1000) NOT NULL,
creationDate VARCHAR(30) NOT NULL,
PRIMARY KEY (id)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
--
-- Table structure for table `priviledges`
--
/*
priviledges
id
userId
module
add
edit
delete */
CREATE TABLE IF NOT EXISTS privilege (
id INT(11) NOT NULL AUTO_INCREMENT,
userId INT(11) NOT NULL,
custAdd TINYINT(1) NOT NULL,
custEdit TINYINT(1) NOT NULL,
custDel TINYINT(1) NOT NULL,
quotAdd TINYINT(1) NOT NULL,
quotEdit TINYINT(1) NOT NULL,
quotDel TINYINT(1) NOT NULL,
quotCmtAdd TINYINT(1) NOT NULL,
quotCmtEdit TINYINT(1) NOT NULL,
quotCmtDel TINYINT(1) NOT NULL,
orderAdd TINYINT(1) NOT NULL,
orderEdit TINYINT(1) NOT NULL,
orderDel TINYINT(1) NOT NULL,
userAdd TINYINT(1) NOT NULL,
userEdit TINYINT(1) NOT NULL,
userDel TINYINT(1) NOT NULL,
PRIMARY KEY (id)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
--
-- Dumping privileges of admin user
--
INSERT INTO `privilege` (`id`, `userId`, `custAdd`, `custEdit`, `custDel`, `quotAdd`, `quotEdit`, `quotDel`, `quotCmtAdd`, `quotCmtEdit`, `quotCmtDel`, `orderAdd`, `orderEdit`, `orderDel`, `userAdd`, `userEdit`, `userDel`) VALUES (NULL, '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1');
--
-- Table structure for table `alerts`
--
CREATE TABLE IF NOT EXISTS alerts (
id INT(11) NOT NULL AUTO_INCREMENT,
moduleName VARCHAR(50) NOT NULL,
message VARCHAR(1000) NOT NULL,
creationDate VARCHAR(30) NOT NULL,
PRIMARY KEY (id)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
--
-- Table structure for table `alertEmails`
--
CREATE TABLE IF NOT EXISTS alertEmails (
id INT(11) NOT NULL AUTO_INCREMENT,
moduleName VARCHAR(50) NOT NULL,
emails VARCHAR(500) NOT NULL,
creationDate VARCHAR(30) NOT NULL,
PRIMARY KEY (id)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;