@dascompany/product 4.4.0 → 4.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/dist/DatabaseConnection.d.ts +0 -57
- package/dist/DatabaseConnection.js +0 -165
package/package.json
CHANGED
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
import StatusTypesTable from './tables/orders/StatusTypesTable';
|
|
2
|
-
import FilesTable from './tables/files/FilesTable';
|
|
3
|
-
import OrdersTable from './tables/orders/OrdersTable';
|
|
4
|
-
import ProductsTable from './tables/public/ProductsTable';
|
|
5
|
-
import StatusesTable from './tables/orders/StatusesTable';
|
|
6
|
-
import AddressesTable from './tables/personalInformation/AddressesTable';
|
|
7
|
-
import ClientAccountsTable from './tables/clients/ClientAccountsTable';
|
|
8
|
-
import PersonalDataTable from './tables/personalInformation/PersonalDataTable';
|
|
9
|
-
import OrdersProductsTable from './tables/orders/OrdersProductsTable';
|
|
10
|
-
import CompanyDetailsTable from './tables/personalInformation/CompanyDetailsTable';
|
|
11
|
-
import DeliveryDetailsTable from './tables/personalInformation/DeliveryDetailsTable';
|
|
12
|
-
import DeliveryMethodsTable from './tables/settings/DeliveryMethodsTable';
|
|
13
|
-
import PaymentMethodsTable from './tables/settings/PaymentMethodsTable';
|
|
14
|
-
import PaymentStatusTypesTable from './tables/orders/PaymentStatusTypesTable';
|
|
15
|
-
import DeliveryStatusTypesTable from './tables/personalInformation/DeliveryStatusTypesTable';
|
|
16
|
-
import DeliveryStatusesTable from './tables/personalInformation/DeliveryStatusesTable';
|
|
17
|
-
import PaymentDetailsTable from './tables/orders/PaymentDetailsTable';
|
|
18
|
-
import PaymentStatusesTable from './tables/orders/PaymentStatusesTable';
|
|
19
|
-
import CompanyDataTable from './tables/settings/CompanyDataTable';
|
|
20
|
-
import FileConnectionsTable from './tables/files/FileConnectionsTable';
|
|
21
|
-
import AdminAccountsTable from './tables/public/AdminAccountsTable';
|
|
22
|
-
import AccountCompanyDetailsTable from './tables/clients/AccountCompanyDetailsTable';
|
|
23
|
-
import AccountDeliveryDetailsTable from './tables/clients/AccountDeliveryDetailsTable';
|
|
24
|
-
import AccountCartTable from './tables/clients/AccountCartTable';
|
|
25
|
-
import MarketPlacesTable from './tables/settings/MarketPlacesTable';
|
|
26
|
-
export default class DatabaseConnection {
|
|
27
|
-
static instance: DatabaseConnection;
|
|
28
|
-
private tables;
|
|
29
|
-
private connection;
|
|
30
|
-
private constructor();
|
|
31
|
-
static getInstance(): DatabaseConnection;
|
|
32
|
-
get statusTypes(): StatusTypesTable;
|
|
33
|
-
get files(): FilesTable;
|
|
34
|
-
get orders(): OrdersTable;
|
|
35
|
-
get products(): ProductsTable;
|
|
36
|
-
get statuses(): StatusesTable;
|
|
37
|
-
get addresses(): AddressesTable;
|
|
38
|
-
get clientAccounts(): ClientAccountsTable;
|
|
39
|
-
get accountCompanyDetails(): AccountCompanyDetailsTable;
|
|
40
|
-
get accountCart(): AccountCartTable;
|
|
41
|
-
get accountDeliveryDetails(): AccountDeliveryDetailsTable;
|
|
42
|
-
get adminAccounts(): AdminAccountsTable;
|
|
43
|
-
get companyDetails(): CompanyDetailsTable;
|
|
44
|
-
get personalData(): PersonalDataTable;
|
|
45
|
-
get ordersProducts(): OrdersProductsTable;
|
|
46
|
-
get deliveryDetails(): DeliveryDetailsTable;
|
|
47
|
-
get deliveryMethods(): DeliveryMethodsTable;
|
|
48
|
-
get paymentMethods(): PaymentMethodsTable;
|
|
49
|
-
get paymentStatusTypes(): PaymentStatusTypesTable;
|
|
50
|
-
get deliveryStatusTypes(): DeliveryStatusTypesTable;
|
|
51
|
-
get deliveryStatuses(): DeliveryStatusesTable;
|
|
52
|
-
get paymentDetails(): PaymentDetailsTable;
|
|
53
|
-
get paymentStatuses(): PaymentStatusesTable;
|
|
54
|
-
get companyData(): CompanyDataTable;
|
|
55
|
-
get marketPlaces(): MarketPlacesTable;
|
|
56
|
-
get fileConnections(): FileConnectionsTable;
|
|
57
|
-
}
|
|
@@ -1,165 +0,0 @@
|
|
|
1
|
-
import { ConnectionFactory } from '@dascompany/database';
|
|
2
|
-
import StatusTypesTable from './tables/orders/StatusTypesTable';
|
|
3
|
-
import TableNames from './tables/TableNames';
|
|
4
|
-
import FilesTable from './tables/files/FilesTable';
|
|
5
|
-
import OrdersTable from './tables/orders/OrdersTable';
|
|
6
|
-
import ProductsTable from './tables/public/ProductsTable';
|
|
7
|
-
import StatusesTable from './tables/orders/StatusesTable';
|
|
8
|
-
import AddressesTable from './tables/personalInformation/AddressesTable';
|
|
9
|
-
import ClientAccountsTable from './tables/clients/ClientAccountsTable';
|
|
10
|
-
import PersonalDataTable from './tables/personalInformation/PersonalDataTable';
|
|
11
|
-
import OrdersProductsTable from './tables/orders/OrdersProductsTable';
|
|
12
|
-
import CompanyDetailsTable from './tables/personalInformation/CompanyDetailsTable';
|
|
13
|
-
import DeliveryDetailsTable from './tables/personalInformation/DeliveryDetailsTable';
|
|
14
|
-
import DeliveryMethodsTable from './tables/settings/DeliveryMethodsTable';
|
|
15
|
-
import PaymentMethodsTable from './tables/settings/PaymentMethodsTable';
|
|
16
|
-
import PaymentStatusTypesTable from './tables/orders/PaymentStatusTypesTable';
|
|
17
|
-
import DeliveryStatusTypesTable from './tables/personalInformation/DeliveryStatusTypesTable';
|
|
18
|
-
import DeliveryStatusesTable from './tables/personalInformation/DeliveryStatusesTable';
|
|
19
|
-
import PaymentDetailsTable from './tables/orders/PaymentDetailsTable';
|
|
20
|
-
import PaymentStatusesTable from './tables/orders/PaymentStatusesTable';
|
|
21
|
-
import CompanyDataTable from './tables/settings/CompanyDataTable';
|
|
22
|
-
import FileConnectionsTable from './tables/files/FileConnectionsTable';
|
|
23
|
-
import AdminAccountsTable from './tables/public/AdminAccountsTable';
|
|
24
|
-
import AccountCompanyDetailsTable from './tables/clients/AccountCompanyDetailsTable';
|
|
25
|
-
import AccountDeliveryDetailsTable from './tables/clients/AccountDeliveryDetailsTable';
|
|
26
|
-
import AccountCartTable from './tables/clients/AccountCartTable';
|
|
27
|
-
import MarketPlacesTable from './tables/settings/MarketPlacesTable';
|
|
28
|
-
export default class DatabaseConnection {
|
|
29
|
-
static instance;
|
|
30
|
-
tables = new Map();
|
|
31
|
-
connection;
|
|
32
|
-
constructor(connection) {
|
|
33
|
-
this.connection = connection;
|
|
34
|
-
}
|
|
35
|
-
static getInstance() {
|
|
36
|
-
(!this.instance);
|
|
37
|
-
this.instance = new DatabaseConnection(ConnectionFactory.get());
|
|
38
|
-
return this.instance;
|
|
39
|
-
}
|
|
40
|
-
get statusTypes() {
|
|
41
|
-
if (!this.tables.get(TableNames.statusTypes))
|
|
42
|
-
this.tables.set(TableNames.statusTypes, new StatusTypesTable(this.connection));
|
|
43
|
-
return this.tables.get(TableNames.statusTypes);
|
|
44
|
-
}
|
|
45
|
-
get files() {
|
|
46
|
-
if (!this.tables.get(TableNames.files))
|
|
47
|
-
this.tables.set(TableNames.files, new FilesTable(this.connection));
|
|
48
|
-
return this.tables.get(TableNames.files);
|
|
49
|
-
}
|
|
50
|
-
get orders() {
|
|
51
|
-
if (!this.tables.get(TableNames.orders))
|
|
52
|
-
this.tables.set(TableNames.orders, new OrdersTable(this.connection));
|
|
53
|
-
return this.tables.get(TableNames.orders);
|
|
54
|
-
}
|
|
55
|
-
get products() {
|
|
56
|
-
if (!this.tables.get(TableNames.products))
|
|
57
|
-
this.tables.set(TableNames.products, new ProductsTable(this.connection));
|
|
58
|
-
return this.tables.get(TableNames.products);
|
|
59
|
-
}
|
|
60
|
-
get statuses() {
|
|
61
|
-
if (!this.tables.get(TableNames.statuses))
|
|
62
|
-
this.tables.set(TableNames.statuses, new StatusesTable(this.connection));
|
|
63
|
-
return this.tables.get(TableNames.statuses);
|
|
64
|
-
}
|
|
65
|
-
get addresses() {
|
|
66
|
-
if (!this.tables.get(TableNames.addresses))
|
|
67
|
-
this.tables.set(TableNames.addresses, new AddressesTable(this.connection));
|
|
68
|
-
return this.tables.get(TableNames.addresses);
|
|
69
|
-
}
|
|
70
|
-
get clientAccounts() {
|
|
71
|
-
if (!this.tables.get(TableNames.clientAccounts))
|
|
72
|
-
this.tables.set(TableNames.clientAccounts, new ClientAccountsTable(this.connection));
|
|
73
|
-
return this.tables.get(TableNames.clientAccounts);
|
|
74
|
-
}
|
|
75
|
-
get accountCompanyDetails() {
|
|
76
|
-
if (!this.tables.get(TableNames.accountCompanyDetails))
|
|
77
|
-
this.tables.set(TableNames.accountCompanyDetails, new AccountCompanyDetailsTable(this.connection));
|
|
78
|
-
return this.tables.get(TableNames.accountCompanyDetails);
|
|
79
|
-
}
|
|
80
|
-
get accountCart() {
|
|
81
|
-
if (!this.tables.get(TableNames.accountCart))
|
|
82
|
-
this.tables.set(TableNames.accountCart, new AccountCartTable(this.connection));
|
|
83
|
-
return this.tables.get(TableNames.accountCart);
|
|
84
|
-
}
|
|
85
|
-
get accountDeliveryDetails() {
|
|
86
|
-
if (!this.tables.get(TableNames.accountDeliveryDetails))
|
|
87
|
-
this.tables.set(TableNames.accountDeliveryDetails, new AccountDeliveryDetailsTable(this.connection));
|
|
88
|
-
return this.tables.get(TableNames.accountDeliveryDetails);
|
|
89
|
-
}
|
|
90
|
-
get adminAccounts() {
|
|
91
|
-
if (!this.tables.get(TableNames.adminAccounts))
|
|
92
|
-
this.tables.set(TableNames.adminAccounts, new AdminAccountsTable(this.connection));
|
|
93
|
-
return this.tables.get(TableNames.adminAccounts);
|
|
94
|
-
}
|
|
95
|
-
get companyDetails() {
|
|
96
|
-
if (!this.tables.get(TableNames.companyDetails))
|
|
97
|
-
this.tables.set(TableNames.companyDetails, new CompanyDetailsTable(this.connection));
|
|
98
|
-
return this.tables.get(TableNames.companyDetails);
|
|
99
|
-
}
|
|
100
|
-
get personalData() {
|
|
101
|
-
if (!this.tables.get(TableNames.personalData))
|
|
102
|
-
this.tables.set(TableNames.personalData, new PersonalDataTable(this.connection));
|
|
103
|
-
return this.tables.get(TableNames.personalData);
|
|
104
|
-
}
|
|
105
|
-
get ordersProducts() {
|
|
106
|
-
if (!this.tables.get(TableNames.ordersProducts))
|
|
107
|
-
this.tables.set(TableNames.ordersProducts, new OrdersProductsTable(this.connection));
|
|
108
|
-
return this.tables.get(TableNames.ordersProducts);
|
|
109
|
-
}
|
|
110
|
-
get deliveryDetails() {
|
|
111
|
-
if (!this.tables.get(TableNames.deliveryDetails))
|
|
112
|
-
this.tables.set(TableNames.deliveryDetails, new DeliveryDetailsTable(this.connection));
|
|
113
|
-
return this.tables.get(TableNames.deliveryDetails);
|
|
114
|
-
}
|
|
115
|
-
get deliveryMethods() {
|
|
116
|
-
if (!this.tables.get(TableNames.deliveryMethods))
|
|
117
|
-
this.tables.set(TableNames.deliveryMethods, new DeliveryMethodsTable(this.connection));
|
|
118
|
-
return this.tables.get(TableNames.deliveryMethods);
|
|
119
|
-
}
|
|
120
|
-
get paymentMethods() {
|
|
121
|
-
if (!this.tables.get(TableNames.paymentMethods))
|
|
122
|
-
this.tables.set(TableNames.paymentMethods, new PaymentMethodsTable(this.connection));
|
|
123
|
-
return this.tables.get(TableNames.paymentMethods);
|
|
124
|
-
}
|
|
125
|
-
get paymentStatusTypes() {
|
|
126
|
-
if (!this.tables.get(TableNames.paymentStatusTypes))
|
|
127
|
-
this.tables.set(TableNames.paymentStatusTypes, new PaymentStatusTypesTable(this.connection));
|
|
128
|
-
return this.tables.get(TableNames.paymentStatusTypes);
|
|
129
|
-
}
|
|
130
|
-
get deliveryStatusTypes() {
|
|
131
|
-
if (!this.tables.get(TableNames.deliveryStatusTypes))
|
|
132
|
-
this.tables.set(TableNames.deliveryStatusTypes, new DeliveryStatusTypesTable(this.connection));
|
|
133
|
-
return this.tables.get(TableNames.deliveryStatusTypes);
|
|
134
|
-
}
|
|
135
|
-
get deliveryStatuses() {
|
|
136
|
-
if (!this.tables.get(TableNames.deliveryStatuses))
|
|
137
|
-
this.tables.set(TableNames.deliveryStatuses, new DeliveryStatusesTable(this.connection));
|
|
138
|
-
return this.tables.get(TableNames.deliveryStatuses);
|
|
139
|
-
}
|
|
140
|
-
get paymentDetails() {
|
|
141
|
-
if (!this.tables.get(TableNames.paymentDetails))
|
|
142
|
-
this.tables.set(TableNames.paymentDetails, new PaymentDetailsTable(this.connection));
|
|
143
|
-
return this.tables.get(TableNames.paymentDetails);
|
|
144
|
-
}
|
|
145
|
-
get paymentStatuses() {
|
|
146
|
-
if (!this.tables.get(TableNames.paymentStatuses))
|
|
147
|
-
this.tables.set(TableNames.paymentStatuses, new PaymentStatusesTable(this.connection));
|
|
148
|
-
return this.tables.get(TableNames.paymentStatuses);
|
|
149
|
-
}
|
|
150
|
-
get companyData() {
|
|
151
|
-
if (!this.tables.get(TableNames.companyData))
|
|
152
|
-
this.tables.set(TableNames.companyData, new CompanyDataTable(this.connection));
|
|
153
|
-
return this.tables.get(TableNames.companyData);
|
|
154
|
-
}
|
|
155
|
-
get marketPlaces() {
|
|
156
|
-
if (!this.tables.get(TableNames.marketPlaces))
|
|
157
|
-
this.tables.set(TableNames.marketPlaces, new MarketPlacesTable(this.connection));
|
|
158
|
-
return this.tables.get(TableNames.marketPlaces);
|
|
159
|
-
}
|
|
160
|
-
get fileConnections() {
|
|
161
|
-
if (!this.tables.get(TableNames.fileConnections))
|
|
162
|
-
this.tables.set(TableNames.fileConnections, new FileConnectionsTable(this.connection));
|
|
163
|
-
return this.tables.get(TableNames.fileConnections);
|
|
164
|
-
}
|
|
165
|
-
}
|