-
Notifications
You must be signed in to change notification settings - Fork 0
/
newdata.sql
112 lines (92 loc) · 2.41 KB
/
newdata.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
//create table admin
(
admin_id serial primary key,
admin_email text not null,
admin_pass text not null
);
/* for categories */
//create table categories(
catID serial primary key,
category text not null
);
/*for professional rating*/
//create table rating
(
ratingID serial primary key,
stars int,
comment text,
from_cusID int references customer_signup(custID),
to_proID int references professional_signup(proID),
review_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
);
/* kart is used for temporary data*/
//create table kart
(
kart_id int not null,
kart_pro_id int references professional_signup(proID)
);
/*customer_signup table is used at signup for customer to enter there data */
//create table customer_signup
(
custID serial primary key,
first_name text not null,
last_name text not null,
email text not null,
password_txt text not null,
image text default 'image/cust_placeholder'
)
/*customer_edit table is used after signup for customer to enter there data */
//create table customer_edit
(
custID int references customer_signup(custID),
address text not null,
city text not null,
pincode text not null,
country text not null,
phone_no text not null,
age int not null,
gender text not null
)
/*customer_order is used to track customer order, to show purchase history */
//create table customer_orders
(
orderID serial primary key,
customer_id int references customer_signup(custID),
due_amount int not null,
invoice_no int not NULL,
total_products int NOT NULL,
order_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
order_status text NOT NULL,
service text,
proid int references professional_signup(proID)
);
/*profesional_signup table is used at signup for professional to enter there data */
//create table professional_signup
(
proID serial primary key,
first_name text not null,
last_name text not null,
email text not null,
password text not null
)
/*profesional_profile table is used after signup for professional to enter there data */
//create table professional_profile
(
proID references professional_signup(proID),
address text not null,
city text not null,
pincode text not null,
country text not null,
phone_no text not null,
experience int not null,
gender text not null,
age int not null,
Expected_salary text not null,
qualification text,
category int references categories(catID),
photo_loc text not null,
identity_proof text not null,
address_proof text not null,
Status text,
fee int not null
)