-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdbscripts
76 lines (53 loc) · 4.85 KB
/
dbscripts
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
--1)DB creation
use goodmason_editor
--2)Creating 'editors' collection
db.createCollection("editors")
--3)Inserting data into 'editors' collection
db.editors.insert({"Username":"ttcp","Name":"Thisura Thejith","Email":"[email protected]"})
db.editors.insert({"Username":"ttpc","Name":"Charles Philips","Email":"[email protected]"})
db.editors.insert({"Username":"chcp","Name":"Chamara Philips","Email":"[email protected]"})
db.editors.insert({"Username":"bcp","Name":"Basil Philips","Email":"[email protected]"})
db.editors.insert({"Username":"ltm","Name":"Lanil Marasinghe","Email":"[email protected]"})
db.editors.insert({"Username":"hnsw","Name":"Sampath Withana","Email":"[email protected]"})
db.editors.insert({"Username":"hjlk","Name":"Hasitha Jayarathne","Email":"[email protected]"})
db.editors.insert({"Username":"knhm","Name":"Kansajith Hemanga","Email":"[email protected]"})
db.editors.insert({"Username":"mds8","Name":"Madusitha Madawa","Email":"[email protected]"})
db.editors.insert({"Username":"jsen","Name":"Jay Sean","Email":"[email protected]"})
--4)Creating 'contents' collection
db.createCollection("contents")
--5)Inserting data into 'contents' collection
db.contents.insert({"ID":"AP1","User":"sputt","Date":"2017-01-02","Title":"House Construction","Content":"40 Per SQFT","Status":"Pending"})
db.contents.insert({"ID":"AP2","User":"supuntt","Date":"2017-01-03","Title":"Carpentry","Content":"20 Per SQFT","Status":"Approved"})
db.contents.insert({"ID":"AP3","User":"jbcn","Date":"2017-01-04","Title":"Masonry","Content":"30 Per SQFT","Status":"Pending"})
db.contents.insert({"ID":"AP4","User":"bbcnn","Date":"2017-05-04","Title":"Tiling","Content":"10 Per SQFT","Status":"Approved"})
db.contents.insert({"ID":"AP5","User":"kkhm","Date":"2017-01-10","Title":"Painting","Content":"40 Per SQFT","Status":"Pending"})
db.contents.insert({"ID":"AP6","User":"hjlm","Date":"2017-10-20","Title":"Masonry","Content":"40 Per SQFT","Status":"Approved"})
db.contents.insert({"ID":"AP7","User":"mhbhj","Date":"2017-01-04","Title":"Decorating","Content":"70 Per SQFT","Status":"Pending"})
db.contents.insert({"ID":"AP8","User":"ppjh","Date":"2017-08-04","Title":"Masonry","Content":"40 Per SQFT","Status":"Pending"})
db.contents.insert({"ID":"AP9","User":"chjk","Date":"2017-05-25","Title":"Tiling","Content":"10 Per SQFT","Status":"Pending"})
db.contents.insert({"ID":"AP10","User":"swes","Date":"2017-07-07","Title":"Painting","Content":"40 Per SQFT","Status":"Pending"})
--6)Creating 'users' collection
db.createCollection("users")
--7)Inserting data into 'users' collection
db.users.insert({"User":"sputt","Date":"2017-01-02","Location":"Battaramulla","Specialty":"Masonary","Likes":100,"Dislikes":1,"Status":"Active"})
db.users.insert({"User":"bbcnn","Date":"2017-06-22","Location":"Galle","Specialty":"Tiling","Likes":10,"Dislikes":0,"Status":"Active"})
db.users.insert({"User":"iron123","Date":"2017-10-25","Location":"Ambalangoda","Specialty":"Painting","Likes":25,"Dislikes":0,"Status":"Active"})
db.users.insert({"User":"masn","Date":"2017-09-09","Location":"Hambanthota","Specialty":"Carpentry","Likes":45,"Dislikes":1,"Status":"Active"})
db.users.insert({"User":"randl","Date":"2017-06-06","Location":"Kaluthara","Specialty":"Decorating","Likes":50,"Dislikes":0,"Status":"Active"})
db.users.insert({"User":"supuntt","Date":"2017-08-02",Location":"Narahenpita","Specialty":"Carpentry","Status":"Pending"})
db.users.insert({"User":"jbcd","Date":"2017-10-02","Location":"Matara","Specialty":"Painting","Status":"Pending"})
db.users.insert({"User":"sampa","Date":"2017-05-05","Location":"Seeduwa","Specialty":"Masonary","Status":"Pending"})
db.users.insert({"User":"hasi123","Date":"2017-08-12","Location":"Malabe","Specialty":"Tiling","Status":"Pending"})
db.users.insert({"User":"mov4","Date":"2017-04-09","Location":"Gampaha","Specialty":"Carpentry","Status":"Pending"})
--8)Creating 'responses' collection
db.createCollection("responses")
--9)Inserting data into 'responses' collection
db.responses.insert({"User":"supuntt","Date":"2017-01-03","Comment":"This website is really helpful","Status":"Under Inspection"})
db.responses.insert({"User":"jbcd","Date":"2017-08-03","Comment":"This website saved my day","Status":"Under Inspection"})
db.responses.insert({"User":"sputt","Date":"2017-07-07","Comment":"A really really fruitful website","Status":"Under Inspection"})
db.responses.insert({"User":"bbcnn","Date":"2017-05-10","Comment":"The best job finding website","Status":"Under Inspection"})
db.responses.insert({"User":"masn","Date":"2017-10-15","Comment":"This is the best online helper that a worker can get","Status":"Under Inspection"})
--10)Creating 'payments' collection
db.createCollection("payments")
--11)Inserting data into 'payments' collection
db.payments.insert({"ContentID":"AP100","Method":"Bank Debit","Date":"2017-01-03","Amount":245,"ReferenceNo":"dsds323232"})