-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathdb.txt
193 lines (166 loc) · 4.46 KB
/
db.txt
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
//// -- LEVEL 1
//// -- Tables and References
// Creating tables
Table tbl_inward_quality_category{
inward_quality_category_id int [pk, increment]
inward_category_name varchar(50) [not null]
created_at datetime
updated_at datetime
status bool
}
Table tbl_sell_quality_category{
sell_quality_category_id int [pk, increment]
sell_category_name varchar(50) [not null]
created_at datetime
updated_at datetime
status bool
}
Table tbl_inward_quality {
inward_quality_id bigint [pk, increment]
quality_name varchar(50) [not null]
inward_quality_category_id int [ref: > tbl_inward_quality_category.inward_quality_category_id]
created_at datetime
updated_at datetime
status bool
}
Table tbl_sell_quality {
sell_quality_id bigint [pk, increment]
quality_name varchar(50) [not null]
sell_quality_category_id int [ref: > tbl_sell_quality_category.sell_quality_category_id]
created_at datetime
updated_at datetime
status bool
}
Table tbl_customer{
customer_id bigint [pk, increment]
company_name varchar(50) [not null]
contact_no varchar(10)
email varchar(255)
gst_no varchar(24) [not null]
gst_code varchar(2) [not null]
address varchar(255) [not null]
created_at datetime
updated_at datetime
status bool
}
Table tbl_vendor{
vendor_id bigint [pk, increment]
company_name varchar(50) [not null]
contact_no varchar(10) [not null]
email varchar(255)
gst_no varchar(24) [not null]
gst_code varchar(2) [not null]
address varchar(255)
created_at datetime
updated_at datetime
status bool
}
Table tbl_broker{
broker_id bigint [pk, increment]
broker_name varchar(70) [not null]
contact_no vatchar(10) [not null]
created_at datetime
updated_at datetime
status bool
}
Table tbl_bank_details{
bank_details_id bigint [pk, increment]
bank_name varchar(100) [not null]
account_no varchar(18) [not null]
ifsc_code varchar(11) [not null]
created_at datetime
updated_at datetime
status bool
}
Table tbl_expense_category{
expense_category_id int [pk, increment]
expense_category varchar(50) [not null]
created_at datetime
updated_at datetime
status bool
}
Table tbl_expense{
expense_id bigint [pk, increment]
expense_date date
expense_category_id int [ref: > tbl_expense_category.expense_category_id]
expense_description text [not null]
expense_amount float [not null]
created_at datetime
updated_at datetime
status bool
}
Table tbl_payment_details{
payment_id bigint [pk, increment]
expense_id bigint [ref: > tbl_expense.expense_id]
payment_date date [not null]
payment_type varchar(50) [not null]
payment_description text [not null]
payment_amount float [not null]
created_at datetime
updated_at datetime
status bool
}
Table tbl_credit{
credit_id bigint [pk, increment]
credit_date date [not null]
credit_description text [not null]
credit_amount float [not null]
created_at datetime
updated_at datetime
status bool
}
Table tbl_inward_mst{
inward_id bigint [pk, increment]
inward_date date [not null]
inward_invoice_no varchar(20) [not null]
company_name bigint [ref: > tbl_vendor.vendor_id]
broker_id bigint [ref: > tbl_broker.broker_id]
gst_percentage int [not null]
created_at datetime
updated_at datetime
status bool
}
Table tbl_inward_details{
inward_details_id bigint [pk, increment]
inward_quality_id bigint [ref:> tbl_inward_quality.inward_quality_id, not null]
qty float [not null]
qty_unit varchar(10) [not null]
rate float [not null]
inward_mst_id bigint [ref:> tbl_inward_mst.inward_id]
created_at datetime
updated_at datetime
status bool
}
Table tbl_challan_mst{
challan_mst_id bigint [pk, increment]
challan_no int
challan_date date
company_name bigint [ref: > tbl_customer.customer_id]
sell_quality_id bigint [ref:> tbl_sell_quality.sell_quality_id, not null]
qty_unit varchar(10) [not null]
total_qty float [not null]
broker_id bigint [ref:> tbl_broker.broker_id]
created_at datetime
updated_at datetime
isDirect bool
status bool
}
Table tbl_challan_details{
challan_details_id bigint [pk, increment]
no bigint
qty float [not null]
challan_mst_id bigint [ref:> tbl_challan_mst.challan_mst_id]
created_at datetime
updated_at datetime
status bool
}
Table tbl_invoice_mst{
invoice_mst_id bigint [pk]
challan_mst_id bigint [ref:> tbl_challan_mst.challan_mst_id]
invoice_date datetime
rate float [not null]
gst_percentage float [not null]
created_at datetime
updated_at datetime
status bool
}