@dascompany/database 3.0.2 → 3.0.3
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 -11
- package/dist/DatabaseConnection.js +0 -28
- package/dist/SQL.json +0 -169
- package/dist/TableConnection.d.ts +0 -74
- package/dist/TableConnection.js +0 -144
- package/dist/mappers/AddressMapper.d.ts +0 -9
- package/dist/mappers/AddressMapper.js +0 -17
- package/dist/mappers/AdminMapper.d.ts +0 -9
- package/dist/mappers/AdminMapper.js +0 -24
- package/dist/mappers/ClientMapper.d.ts +0 -9
- package/dist/mappers/ClientMapper.js +0 -24
- package/dist/mappers/CompanyDataMapper.d.ts +0 -9
- package/dist/mappers/CompanyDataMapper.js +0 -17
- package/dist/mappers/CompanyDetailsMapper.d.ts +0 -9
- package/dist/mappers/CompanyDetailsMapper.js +0 -22
- package/dist/mappers/ContactDetailsMapper.d.ts +0 -9
- package/dist/mappers/ContactDetailsMapper.js +0 -18
- package/dist/mappers/DeliveryDetailsMapper.d.ts +0 -9
- package/dist/mappers/DeliveryDetailsMapper.js +0 -17
- package/dist/mappers/DeliveryMethodsMapper.d.ts +0 -9
- package/dist/mappers/DeliveryMethodsMapper.js +0 -17
- package/dist/mappers/DeliveryStatusMapper.d.ts +0 -9
- package/dist/mappers/DeliveryStatusMapper.js +0 -15
- package/dist/mappers/FileConnectionMapper.d.ts +0 -9
- package/dist/mappers/FileConnectionMapper.js +0 -17
- package/dist/mappers/FileMapper.d.ts +0 -9
- package/dist/mappers/FileMapper.js +0 -17
- package/dist/mappers/InvoiceDetailsMapper.d.ts +0 -9
- package/dist/mappers/InvoiceDetailsMapper.js +0 -17
- package/dist/mappers/OrderMapper.d.ts +0 -9
- package/dist/mappers/OrderMapper.js +0 -19
- package/dist/mappers/OrderProductMapper.d.ts +0 -9
- package/dist/mappers/OrderProductMapper.js +0 -15
- package/dist/mappers/PaymentDetailsMapper.d.ts +0 -9
- package/dist/mappers/PaymentDetailsMapper.js +0 -17
- package/dist/mappers/PaymentMethodsMapper.d.ts +0 -9
- package/dist/mappers/PaymentMethodsMapper.js +0 -17
- package/dist/mappers/PaymentStatusMapper.d.ts +0 -9
- package/dist/mappers/PaymentStatusMapper.js +0 -15
- package/dist/mappers/PersonalDataMapper.d.ts +0 -9
- package/dist/mappers/PersonalDataMapper.js +0 -17
- package/dist/mappers/ProductMapper.d.ts +0 -9
- package/dist/mappers/ProductMapper.js +0 -20
- package/dist/mappers/StatusMapper.d.ts +0 -9
- package/dist/mappers/StatusMapper.js +0 -15
- package/dist/reader/AddressesReader.d.ts +0 -6
- package/dist/reader/AddressesReader.js +0 -24
- package/dist/reader/ClientAccountReader.d.ts +0 -13
- package/dist/reader/ClientAccountReader.js +0 -47
- package/dist/reader/CompanyDataReader.d.ts +0 -4
- package/dist/reader/CompanyDataReader.js +0 -27
- package/dist/reader/CompanyDetailsReader.d.ts +0 -4
- package/dist/reader/CompanyDetailsReader.js +0 -15
- package/dist/reader/ContactDetailsReader.d.ts +0 -4
- package/dist/reader/ContactDetailsReader.js +0 -16
- package/dist/reader/DeliveryDetailsReader.d.ts +0 -4
- package/dist/reader/DeliveryDetailsReader.js +0 -31
- package/dist/reader/DeliveryMethodReader.d.ts +0 -6
- package/dist/reader/DeliveryMethodReader.js +0 -18
- package/dist/reader/DeliveryStatusReader.d.ts +0 -5
- package/dist/reader/DeliveryStatusReader.js +0 -31
- package/dist/reader/FileConnectionsReader.d.ts +0 -6
- package/dist/reader/FileConnectionsReader.js +0 -25
- package/dist/reader/FilesReader.d.ts +0 -12
- package/dist/reader/FilesReader.js +0 -45
- package/dist/reader/InvoiceDetailsReader.d.ts +0 -4
- package/dist/reader/InvoiceDetailsReader.js +0 -21
- package/dist/reader/OrderProductsReader.d.ts +0 -10
- package/dist/reader/OrderProductsReader.js +0 -92
- package/dist/reader/OrderReader.d.ts +0 -12
- package/dist/reader/OrderReader.js +0 -51
- package/dist/reader/OrderStatusReader.d.ts +0 -6
- package/dist/reader/OrderStatusReader.js +0 -28
- package/dist/reader/PersonalDataReader.d.ts +0 -5
- package/dist/reader/PersonalDataReader.js +0 -27
- package/dist/reader/ProductReader.d.ts +0 -13
- package/dist/reader/ProductReader.js +0 -81
- package/dist/reader/StatusTypesReader.d.ts +0 -3
- package/dist/reader/StatusTypesReader.js +0 -8
- package/dist/reader/payment/PaymentDetailsReader.d.ts +0 -5
- package/dist/reader/payment/PaymentDetailsReader.js +0 -27
- package/dist/reader/payment/PaymentMethodReader.d.ts +0 -6
- package/dist/reader/payment/PaymentMethodReader.js +0 -18
- package/dist/reader/payment/PaymentStatusesReader.d.ts +0 -5
- package/dist/reader/payment/PaymentStatusesReader.js +0 -30
- package/dist/repo/AddressesRepo.d.ts +0 -5
- package/dist/repo/AddressesRepo.js +0 -14
- package/dist/repo/AdminRepo.d.ts +0 -12
- package/dist/repo/AdminRepo.js +0 -32
- package/dist/repo/ClientAccountRepo.d.ts +0 -7
- package/dist/repo/ClientAccountRepo.js +0 -24
- package/dist/repo/CompanyDataRepo.d.ts +0 -4
- package/dist/repo/CompanyDataRepo.js +0 -11
- package/dist/repo/CompanyDetailsRepo.d.ts +0 -5
- package/dist/repo/CompanyDetailsRepo.js +0 -14
- package/dist/repo/ContactDetailsRepo.d.ts +0 -6
- package/dist/repo/ContactDetailsRepo.js +0 -19
- package/dist/repo/DeliveryDetailsRepo.d.ts +0 -5
- package/dist/repo/DeliveryDetailsRepo.js +0 -14
- package/dist/repo/DeliveryMethodRepo.d.ts +0 -4
- package/dist/repo/DeliveryMethodRepo.js +0 -11
- package/dist/repo/FileConnectionsRepo.d.ts +0 -7
- package/dist/repo/FileConnectionsRepo.js +0 -25
- package/dist/repo/FilesRepo.d.ts +0 -7
- package/dist/repo/FilesRepo.js +0 -26
- package/dist/repo/InvoiceDetailsRepo.d.ts +0 -5
- package/dist/repo/InvoiceDetailsRepo.js +0 -14
- package/dist/repo/OrderProductsRepo.d.ts +0 -7
- package/dist/repo/OrderProductsRepo.js +0 -37
- package/dist/repo/OrderRepo.d.ts +0 -5
- package/dist/repo/OrderRepo.js +0 -14
- package/dist/repo/OrderStatusRepo.d.ts +0 -7
- package/dist/repo/OrderStatusRepo.js +0 -27
- package/dist/repo/PaymentDetailsRepo.d.ts +0 -5
- package/dist/repo/PaymentDetailsRepo.js +0 -14
- package/dist/repo/PaymentMethodRepo.d.ts +0 -4
- package/dist/repo/PaymentMethodRepo.js +0 -11
- package/dist/repo/PersonalDataRepo.d.ts +0 -5
- package/dist/repo/PersonalDataRepo.js +0 -16
- package/dist/repo/ProductRepo.d.ts +0 -6
- package/dist/repo/ProductRepo.js +0 -21
- package/dist/stockObjects/Address.d.ts +0 -33
- package/dist/stockObjects/Address.js +0 -69
- package/dist/stockObjects/Admin.d.ts +0 -25
- package/dist/stockObjects/Admin.js +0 -57
- package/dist/stockObjects/Client.d.ts +0 -24
- package/dist/stockObjects/Client.js +0 -57
- package/dist/stockObjects/CompanyData.d.ts +0 -21
- package/dist/stockObjects/CompanyData.js +0 -51
- package/dist/stockObjects/CompanyDetails.d.ts +0 -17
- package/dist/stockObjects/CompanyDetails.js +0 -34
- package/dist/stockObjects/ContactDetails.d.ts +0 -12
- package/dist/stockObjects/ContactDetails.js +0 -26
- package/dist/stockObjects/DeliveryDetails.d.ts +0 -16
- package/dist/stockObjects/DeliveryDetails.js +0 -37
- package/dist/stockObjects/DeliveryMethods.d.ts +0 -12
- package/dist/stockObjects/DeliveryMethods.js +0 -26
- package/dist/stockObjects/DeliveryStatus.d.ts +0 -18
- package/dist/stockObjects/DeliveryStatus.js +0 -42
- package/dist/stockObjects/File.d.ts +0 -21
- package/dist/stockObjects/File.js +0 -50
- package/dist/stockObjects/FileConnection.d.ts +0 -18
- package/dist/stockObjects/FileConnection.js +0 -42
- package/dist/stockObjects/InvoiceDetails.d.ts +0 -12
- package/dist/stockObjects/InvoiceDetails.js +0 -26
- package/dist/stockObjects/Order.d.ts +0 -41
- package/dist/stockObjects/Order.js +0 -97
- package/dist/stockObjects/OrderProduct.d.ts +0 -15
- package/dist/stockObjects/OrderProduct.js +0 -33
- package/dist/stockObjects/PaymentDetails.d.ts +0 -12
- package/dist/stockObjects/PaymentDetails.js +0 -26
- package/dist/stockObjects/PaymentMethods.d.ts +0 -12
- package/dist/stockObjects/PaymentMethods.js +0 -26
- package/dist/stockObjects/PaymentStatus.d.ts +0 -13
- package/dist/stockObjects/PaymentStatus.js +0 -26
- package/dist/stockObjects/PersonalData.d.ts +0 -42
- package/dist/stockObjects/PersonalData.js +0 -81
- package/dist/stockObjects/Product.d.ts +0 -70
- package/dist/stockObjects/Product.js +0 -163
- package/dist/stockObjects/Status.d.ts +0 -23
- package/dist/stockObjects/Status.js +0 -50
- package/dist/tables/clients/ClientAccountsTable.d.ts +0 -17
- package/dist/tables/clients/ClientAccountsTable.js +0 -74
- package/dist/tables/files/FileConnectionsTable.d.ts +0 -12
- package/dist/tables/files/FileConnectionsTable.js +0 -41
- package/dist/tables/files/FilesTable.d.ts +0 -17
- package/dist/tables/files/FilesTable.js +0 -65
- package/dist/tables/orders/OrdersProductsTable.d.ts +0 -14
- package/dist/tables/orders/OrdersProductsTable.js +0 -54
- package/dist/tables/orders/OrdersTable.d.ts +0 -15
- package/dist/tables/orders/OrdersTable.js +0 -60
- package/dist/tables/orders/PaymentDetailsTable.d.ts +0 -10
- package/dist/tables/orders/PaymentDetailsTable.js +0 -34
- package/dist/tables/orders/PaymentStatusTypesTable.d.ts +0 -7
- package/dist/tables/orders/PaymentStatusTypesTable.js +0 -10
- package/dist/tables/orders/PaymentStatusesTable.d.ts +0 -9
- package/dist/tables/orders/PaymentStatusesTable.js +0 -30
- package/dist/tables/orders/StatusTypesTable.d.ts +0 -4
- package/dist/tables/orders/StatusTypesTable.js +0 -9
- package/dist/tables/orders/StatusesTable.d.ts +0 -11
- package/dist/tables/orders/StatusesTable.js +0 -40
- package/dist/tables/personalInformation/AddressesTable.d.ts +0 -10
- package/dist/tables/personalInformation/AddressesTable.js +0 -37
- package/dist/tables/personalInformation/CompanyDetailsTable.d.ts +0 -11
- package/dist/tables/personalInformation/CompanyDetailsTable.js +0 -38
- package/dist/tables/personalInformation/ContactDetailsTable.d.ts +0 -10
- package/dist/tables/personalInformation/ContactDetailsTable.js +0 -34
- package/dist/tables/personalInformation/DeliveryDetailsTable.d.ts +0 -10
- package/dist/tables/personalInformation/DeliveryDetailsTable.js +0 -35
- package/dist/tables/personalInformation/DeliveryStatusTypesTable.d.ts +0 -7
- package/dist/tables/personalInformation/DeliveryStatusTypesTable.js +0 -10
- package/dist/tables/personalInformation/DeliveryStatusesTable.d.ts +0 -9
- package/dist/tables/personalInformation/DeliveryStatusesTable.js +0 -31
- package/dist/tables/personalInformation/InvoiceDetailsTable.d.ts +0 -10
- package/dist/tables/personalInformation/InvoiceDetailsTable.js +0 -34
- package/dist/tables/personalInformation/PersonalDataTable.d.ts +0 -10
- package/dist/tables/personalInformation/PersonalDataTable.js +0 -37
- package/dist/tables/public/AdminAccountsTable.d.ts +0 -15
- package/dist/tables/public/AdminAccountsTable.js +0 -64
- package/dist/tables/public/ProductsTable.d.ts +0 -19
- package/dist/tables/public/ProductsTable.js +0 -98
- package/dist/tables/settings/CompanyDataTable.d.ts +0 -10
- package/dist/tables/settings/CompanyDataTable.js +0 -37
- package/dist/tables/settings/DeliveryMethodsTable.d.ts +0 -12
- package/dist/tables/settings/DeliveryMethodsTable.js +0 -43
- package/dist/tables/settings/PaymentMethodsTable.d.ts +0 -12
- package/dist/tables/settings/PaymentMethodsTable.js +0 -43
- package/dist/types/AddressI.d.ts +0 -9
- package/dist/types/AddressI.js +0 -1
- package/dist/types/ClaimI.d.ts +0 -4
- package/dist/types/ClaimI.js +0 -1
- package/dist/types/ClientAccountI.d.ts +0 -10
- package/dist/types/ClientAccountI.js +0 -1
- package/dist/types/CompanyDataI.d.ts +0 -8
- package/dist/types/CompanyDataI.js +0 -1
- package/dist/types/CompanyDetailsI.d.ts +0 -5
- package/dist/types/CompanyDetailsI.js +0 -1
- package/dist/types/ContactDetailsI.d.ts +0 -7
- package/dist/types/ContactDetailsI.js +0 -1
- package/dist/types/DeliveryDetailsI.d.ts +0 -8
- package/dist/types/DeliveryDetailsI.js +0 -1
- package/dist/types/DeliveryMethodI.d.ts +0 -5
- package/dist/types/DeliveryMethodI.js +0 -1
- package/dist/types/FileConnectionI.d.ts +0 -6
- package/dist/types/FileConnectionI.js +0 -1
- package/dist/types/FileConnectionTypeE.d.ts +0 -4
- package/dist/types/FileConnectionTypeE.js +0 -5
- package/dist/types/FileI.d.ts +0 -6
- package/dist/types/FileI.js +0 -1
- package/dist/types/InvoiceDetailsI.d.ts +0 -7
- package/dist/types/InvoiceDetailsI.js +0 -1
- package/dist/types/OrderI.d.ts +0 -12
- package/dist/types/OrderI.js +0 -1
- package/dist/types/OrderProductI.d.ts +0 -15
- package/dist/types/OrderProductI.js +0 -1
- package/dist/types/OrderStatusI.d.ts +0 -7
- package/dist/types/OrderStatusI.js +0 -1
- package/dist/types/PaymentDetailsI.d.ts +0 -6
- package/dist/types/PaymentDetailsI.js +0 -1
- package/dist/types/PaymentMethodE.d.ts +0 -5
- package/dist/types/PaymentMethodE.js +0 -6
- package/dist/types/PaymentMethodI.d.ts +0 -5
- package/dist/types/PaymentMethodI.js +0 -1
- package/dist/types/PaymentStatusE.d.ts +0 -6
- package/dist/types/PaymentStatusE.js +0 -7
- package/dist/types/PersonalDataI.d.ts +0 -10
- package/dist/types/PersonalDataI.js +0 -1
- package/dist/types/ProductI.d.ts +0 -22
- package/dist/types/ProductI.js +0 -1
- package/dist/types/StatusI.d.ts +0 -5
- package/dist/types/StatusI.js +0 -1
- package/dist/types/rows/AddressRow.d.ts +0 -9
- package/dist/types/rows/AddressRow.js +0 -1
- package/dist/types/rows/AdminRow.d.ts +0 -9
- package/dist/types/rows/AdminRow.js +0 -1
- package/dist/types/rows/ClientAccountRow.d.ts +0 -10
- package/dist/types/rows/ClientAccountRow.js +0 -1
- package/dist/types/rows/CompanyDataRow.d.ts +0 -8
- package/dist/types/rows/CompanyDataRow.js +0 -1
- package/dist/types/rows/CompanyDetailsRow.d.ts +0 -5
- package/dist/types/rows/CompanyDetailsRow.js +0 -1
- package/dist/types/rows/ContactDetailsRow.d.ts +0 -5
- package/dist/types/rows/ContactDetailsRow.js +0 -1
- package/dist/types/rows/DeliveryDetailsRow.d.ts +0 -6
- package/dist/types/rows/DeliveryDetailsRow.js +0 -1
- package/dist/types/rows/DeliveryMethodRow.d.ts +0 -5
- package/dist/types/rows/DeliveryMethodRow.js +0 -1
- package/dist/types/rows/DeliveryStatusRow.d.ts +0 -7
- package/dist/types/rows/DeliveryStatusRow.js +0 -1
- package/dist/types/rows/FileConnectionRow.d.ts +0 -6
- package/dist/types/rows/FileConnectionRow.js +0 -1
- package/dist/types/rows/FileRow.d.ts +0 -9
- package/dist/types/rows/FileRow.js +0 -1
- package/dist/types/rows/InvoiceDetailsRow.d.ts +0 -5
- package/dist/types/rows/InvoiceDetailsRow.js +0 -1
- package/dist/types/rows/OrderProductRow.d.ts +0 -6
- package/dist/types/rows/OrderProductRow.js +0 -1
- package/dist/types/rows/OrderRow.d.ts +0 -15
- package/dist/types/rows/OrderRow.js +0 -1
- package/dist/types/rows/PaymentDetailsRow.d.ts +0 -6
- package/dist/types/rows/PaymentDetailsRow.js +0 -1
- package/dist/types/rows/PaymentMethodRow.d.ts +0 -5
- package/dist/types/rows/PaymentMethodRow.js +0 -1
- package/dist/types/rows/PaymentStatusRow.d.ts +0 -6
- package/dist/types/rows/PaymentStatusRow.js +0 -1
- package/dist/types/rows/PersonalDataRow.d.ts +0 -8
- package/dist/types/rows/PersonalDataRow.js +0 -1
- package/dist/types/rows/ProductRow.d.ts +0 -17
- package/dist/types/rows/ProductRow.js +0 -1
- package/dist/types/rows/StatusRow.d.ts +0 -8
- package/dist/types/rows/StatusRow.js +0 -1
- package/dist/utils/OrderByI.d.ts +0 -4
- package/dist/utils/OrderByI.js +0 -1
- package/dist/utils/calculateNetToGrossPrice.d.ts +0 -1
- package/dist/utils/calculateNetToGrossPrice.js +0 -7
- package/dist/utils/correctPhoneNumber.d.ts +0 -1
- package/dist/utils/correctPhoneNumber.js +0 -14
package/dist/repo/AdminRepo.js
DELETED
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import DatabaseConnection from "../DatabaseConnection";
|
|
2
|
-
import Admin from "../stockObjects/Admin";
|
|
3
|
-
export default class AdminRepo {
|
|
4
|
-
static async get(accountId) {
|
|
5
|
-
const connection = DatabaseConnection.get();
|
|
6
|
-
const account = await connection.adminAccounts.select(accountId);
|
|
7
|
-
return this.createAdminFromRow(account);
|
|
8
|
-
}
|
|
9
|
-
static async getIdForEmail(email) {
|
|
10
|
-
const connection = DatabaseConnection.get();
|
|
11
|
-
return await connection.adminAccounts.selectForEmail(email);
|
|
12
|
-
}
|
|
13
|
-
static async getAll(queryOptions) {
|
|
14
|
-
const connection = DatabaseConnection.get();
|
|
15
|
-
const adminAccounts = await connection.adminAccounts.selectAll(queryOptions);
|
|
16
|
-
const quantity = await connection.adminAccounts.count(queryOptions);
|
|
17
|
-
return { adminAccounts: this.createAdminsFromRows(adminAccounts), quantity };
|
|
18
|
-
}
|
|
19
|
-
static createAdminsFromRows(dataRows) {
|
|
20
|
-
const admins = [];
|
|
21
|
-
for (const dataRow of dataRows) {
|
|
22
|
-
const admin = this.createAdminFromRow(dataRow);
|
|
23
|
-
admins.push(admin);
|
|
24
|
-
}
|
|
25
|
-
return admins;
|
|
26
|
-
}
|
|
27
|
-
static createAdminFromRow(dataRow) {
|
|
28
|
-
const admin = new Admin(dataRow.email, dataRow.first_name, dataRow.last_name, dataRow.activated, dataRow.deleted, dataRow.created_at);
|
|
29
|
-
admin.setId(dataRow.id);
|
|
30
|
-
return admin;
|
|
31
|
-
}
|
|
32
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import Client from "../stockObjects/Client";
|
|
2
|
-
export default class ClientAccountRepo {
|
|
3
|
-
static get(accountId: number): Promise<Client>;
|
|
4
|
-
static getById(clientId: number): Promise<Client>;
|
|
5
|
-
static getEmailForId(clientId: number): Promise<string>;
|
|
6
|
-
private static createCilentAccountFromRow;
|
|
7
|
-
}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import DatabaseConnection from "../DatabaseConnection";
|
|
2
|
-
import Client from "../stockObjects/Client";
|
|
3
|
-
export default class ClientAccountRepo {
|
|
4
|
-
static async get(accountId) {
|
|
5
|
-
const connection = DatabaseConnection.get();
|
|
6
|
-
const accountData = await connection.accounts.select(accountId);
|
|
7
|
-
return this.createCilentAccountFromRow(accountData);
|
|
8
|
-
}
|
|
9
|
-
static async getById(clientId) {
|
|
10
|
-
const connection = DatabaseConnection.get();
|
|
11
|
-
const client = await connection.accounts.select(clientId);
|
|
12
|
-
return this.createCilentAccountFromRow(client);
|
|
13
|
-
}
|
|
14
|
-
static async getEmailForId(clientId) {
|
|
15
|
-
const connection = DatabaseConnection.get();
|
|
16
|
-
const email = await connection.accounts.selectEmail(clientId);
|
|
17
|
-
return email;
|
|
18
|
-
}
|
|
19
|
-
static createCilentAccountFromRow(accountData) {
|
|
20
|
-
const client = new Client(accountData.email, accountData.activated, accountData.deleted, accountData.contact_details_id, accountData.delivery_details_id, accountData.invoice_details_id, accountData.created_at);
|
|
21
|
-
client.setId(accountData.id);
|
|
22
|
-
return client;
|
|
23
|
-
}
|
|
24
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import DatabaseConnection from "../DatabaseConnection";
|
|
2
|
-
import CompanyData from "../stockObjects/CompanyData";
|
|
3
|
-
export default class CompanyDataRepo {
|
|
4
|
-
static async get() {
|
|
5
|
-
const connection = DatabaseConnection.get();
|
|
6
|
-
const companyDataRow = await connection.companyData.select();
|
|
7
|
-
const companyData = new CompanyData(companyDataRow.name, companyDataRow.tax_number, companyDataRow.phone_number, companyDataRow.email, companyDataRow.address_id);
|
|
8
|
-
companyData.setId(companyDataRow.id);
|
|
9
|
-
return companyData;
|
|
10
|
-
}
|
|
11
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import DatabaseConnection from "../DatabaseConnection";
|
|
2
|
-
import CompanyDetails from "../stockObjects/CompanyDetails";
|
|
3
|
-
export default class CompanyDetailsRepo {
|
|
4
|
-
static async get(id) {
|
|
5
|
-
const connection = DatabaseConnection.get();
|
|
6
|
-
const companyDetailsRow = await connection.companyDetails.select(id);
|
|
7
|
-
return this.createCompanyDetailsFromRow(companyDetailsRow);
|
|
8
|
-
}
|
|
9
|
-
static createCompanyDetailsFromRow(companyDetailsRow) {
|
|
10
|
-
const companyDetails = new CompanyDetails(companyDetailsRow.name, companyDetailsRow.tax_number);
|
|
11
|
-
companyDetails.setId(companyDetailsRow.id);
|
|
12
|
-
return companyDetails;
|
|
13
|
-
}
|
|
14
|
-
}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import DatabaseConnection from "../DatabaseConnection";
|
|
2
|
-
import ContactDetails from "../stockObjects/ContactDetails";
|
|
3
|
-
export default class ContactDetailsRepo {
|
|
4
|
-
static async get(contactDetailsId) {
|
|
5
|
-
const connection = DatabaseConnection.get();
|
|
6
|
-
const contactDetailsRow = await connection.contactDetails.select(contactDetailsId);
|
|
7
|
-
return this.createContactDetailsFromRow(contactDetailsRow);
|
|
8
|
-
}
|
|
9
|
-
static async getNextId() {
|
|
10
|
-
const connection = DatabaseConnection.get();
|
|
11
|
-
const contactDetails = await connection.contactDetails.selectNextId();
|
|
12
|
-
return contactDetails;
|
|
13
|
-
}
|
|
14
|
-
static createContactDetailsFromRow(contactDetailsRow) {
|
|
15
|
-
const contactDetails = new ContactDetails(contactDetailsRow.personal_data_id, contactDetailsRow.address_id);
|
|
16
|
-
contactDetails.setId(contactDetailsRow.id);
|
|
17
|
-
return contactDetails;
|
|
18
|
-
}
|
|
19
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import DatabaseConnection from "../DatabaseConnection";
|
|
2
|
-
import DeliveryDetails from "../stockObjects/DeliveryDetails";
|
|
3
|
-
export default class DeliveryDetailsRepo {
|
|
4
|
-
static async get(deliveryDetailsId) {
|
|
5
|
-
const connection = DatabaseConnection.get();
|
|
6
|
-
const deliveryDetailsRow = await connection.deliveryDetails.select(deliveryDetailsId);
|
|
7
|
-
return this.createDeliveryDetailsFromRow(deliveryDetailsRow);
|
|
8
|
-
}
|
|
9
|
-
static createDeliveryDetailsFromRow(deliveryDetailsRow) {
|
|
10
|
-
const deliveryDetails = new DeliveryDetails(deliveryDetailsRow.personal_data_id, deliveryDetailsRow.address_id, deliveryDetailsRow.delivery_method_id);
|
|
11
|
-
deliveryDetails.setId(deliveryDetailsRow.id);
|
|
12
|
-
return deliveryDetails;
|
|
13
|
-
}
|
|
14
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import DatabaseConnection from "../DatabaseConnection";
|
|
2
|
-
import DeliveryMethods from "../stockObjects/DeliveryMethods";
|
|
3
|
-
export default class DeliveryMethodRepo {
|
|
4
|
-
static async get(id) {
|
|
5
|
-
const connection = DatabaseConnection.get();
|
|
6
|
-
const deliveryMethodsRow = await connection.deliveryMethods.select(id);
|
|
7
|
-
const deliveryMethods = new DeliveryMethods(deliveryMethodsRow.key, deliveryMethodsRow.active);
|
|
8
|
-
deliveryMethods.setId(deliveryMethodsRow.id);
|
|
9
|
-
return deliveryMethods;
|
|
10
|
-
}
|
|
11
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import FileConnection from "../stockObjects/FileConnection";
|
|
2
|
-
export default class FileConnectionsRepo {
|
|
3
|
-
static getAllForFileId(fileId: number): Promise<FileConnection[]>;
|
|
4
|
-
static deleteAllForConnection(connectionType: string, connectionId: number): Promise<boolean>;
|
|
5
|
-
private static correctFileConnections;
|
|
6
|
-
private static correctFileConnection;
|
|
7
|
-
}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import DatabaseConnection from "../DatabaseConnection";
|
|
2
|
-
import FileConnection from "../stockObjects/FileConnection";
|
|
3
|
-
export default class FileConnectionsRepo {
|
|
4
|
-
static async getAllForFileId(fileId) {
|
|
5
|
-
const connection = DatabaseConnection.get();
|
|
6
|
-
const fileConnections = await connection.fileConnections.selectForFileId(fileId);
|
|
7
|
-
return this.correctFileConnections(fileConnections);
|
|
8
|
-
}
|
|
9
|
-
static async deleteAllForConnection(connectionType, connectionId) {
|
|
10
|
-
const connection = DatabaseConnection.get();
|
|
11
|
-
return await connection.fileConnections.deleteForConnection(connectionType, connectionId);
|
|
12
|
-
}
|
|
13
|
-
static correctFileConnections(dataRows) {
|
|
14
|
-
const fileConnections = [];
|
|
15
|
-
for (const dataRow of dataRows) {
|
|
16
|
-
const fileConnection = this.correctFileConnection(dataRow);
|
|
17
|
-
fileConnections.push(fileConnection);
|
|
18
|
-
}
|
|
19
|
-
return fileConnections;
|
|
20
|
-
}
|
|
21
|
-
static correctFileConnection(fileConnections) {
|
|
22
|
-
const correctFileConnection = new FileConnection(fileConnections.file_id, fileConnections.connection_type, fileConnections.connection_id, fileConnections.sequence);
|
|
23
|
-
return correctFileConnection;
|
|
24
|
-
}
|
|
25
|
-
}
|
package/dist/repo/FilesRepo.d.ts
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import FileConnectionTypeE from "../types/FileConnectionTypeE";
|
|
2
|
-
export default class FilesRepo {
|
|
3
|
-
static get(fileId: number): Promise<any>;
|
|
4
|
-
static getAllForConnection(connectionType: FileConnectionTypeE, connectionId: number): Promise<any>;
|
|
5
|
-
private static createFilesFromRows;
|
|
6
|
-
private static createFileFromRow;
|
|
7
|
-
}
|
package/dist/repo/FilesRepo.js
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import DatabaseConnection from "../DatabaseConnection";
|
|
2
|
-
import File from "../stockObjects/File";
|
|
3
|
-
export default class FilesRepo {
|
|
4
|
-
static async get(fileId) {
|
|
5
|
-
const connection = DatabaseConnection.get();
|
|
6
|
-
const file = await connection.files.select(fileId);
|
|
7
|
-
return this.createFileFromRow(file);
|
|
8
|
-
}
|
|
9
|
-
static async getAllForConnection(connectionType, connectionId) {
|
|
10
|
-
const connection = DatabaseConnection.get();
|
|
11
|
-
const files = await connection.files.selectForConnection(connectionType, connectionId);
|
|
12
|
-
return this.createFilesFromRows(files);
|
|
13
|
-
}
|
|
14
|
-
static async createFilesFromRows(dataRows) {
|
|
15
|
-
const files = [];
|
|
16
|
-
for (const dataRow of dataRows) {
|
|
17
|
-
const file = await this.createFileFromRow(dataRow);
|
|
18
|
-
files.push(file);
|
|
19
|
-
}
|
|
20
|
-
return files;
|
|
21
|
-
}
|
|
22
|
-
static createFileFromRow(file) {
|
|
23
|
-
const correctFile = new File(file.name, file.catalog, file.size_kb, file.type, file.orginal_name);
|
|
24
|
-
return correctFile;
|
|
25
|
-
}
|
|
26
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import DatabaseConnection from "../DatabaseConnection";
|
|
2
|
-
import InvoiceDetails from "../stockObjects/InvoiceDetails";
|
|
3
|
-
export default class InvoiceDetailsRepo {
|
|
4
|
-
static async get(invoiceDetailsId) {
|
|
5
|
-
const connection = DatabaseConnection.get();
|
|
6
|
-
const invoiceDetailsRow = await connection.invoiceDetails.select(invoiceDetailsId);
|
|
7
|
-
return this.createInvoiceDetailsFromRow(invoiceDetailsRow);
|
|
8
|
-
}
|
|
9
|
-
static createInvoiceDetailsFromRow(invoiceDetailsRow) {
|
|
10
|
-
const invoiceDetails = new InvoiceDetails(invoiceDetailsRow.personal_data_id, invoiceDetailsRow.address_id);
|
|
11
|
-
invoiceDetails.setId(invoiceDetailsRow.id);
|
|
12
|
-
return invoiceDetails;
|
|
13
|
-
}
|
|
14
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import OrderProduct from "../stockObjects/OrderProduct";
|
|
2
|
-
export default class OrderProductsRepo {
|
|
3
|
-
static getAllActiveForOrderId(orderId: number): Promise<OrderProduct[]>;
|
|
4
|
-
static getAllForIds(orderProductsIds: number[]): Promise<OrderProduct[]>;
|
|
5
|
-
private static createOrdersProductsFromRows;
|
|
6
|
-
private static createOrdersProductFromRow;
|
|
7
|
-
}
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import DatabaseConnection from "../DatabaseConnection";
|
|
2
|
-
import OrderProduct from "../stockObjects/OrderProduct";
|
|
3
|
-
import ConnectorE from "../types/ConnectorE";
|
|
4
|
-
import ParameterType from "../types/parameters/ParameterType";
|
|
5
|
-
export default class OrderProductsRepo {
|
|
6
|
-
static async getAllActiveForOrderId(orderId) {
|
|
7
|
-
const connection = DatabaseConnection.get();
|
|
8
|
-
const orderProducts = await connection.ordersProducts.selectAll(orderId);
|
|
9
|
-
return this.createOrdersProductsFromRows(orderProducts);
|
|
10
|
-
}
|
|
11
|
-
static async getAllForIds(orderProductsIds) {
|
|
12
|
-
const connection = DatabaseConnection.get();
|
|
13
|
-
const queryOptions = {
|
|
14
|
-
where: {
|
|
15
|
-
connector: ConnectorE.and,
|
|
16
|
-
parameters: [
|
|
17
|
-
{ name: 'id', type: ParameterType.arrayBigint, value: orderProductsIds },
|
|
18
|
-
]
|
|
19
|
-
}
|
|
20
|
-
};
|
|
21
|
-
const orderProducts = await connection.ordersProducts.selectAllForIds(queryOptions);
|
|
22
|
-
return this.createOrdersProductsFromRows(orderProducts);
|
|
23
|
-
}
|
|
24
|
-
static async createOrdersProductsFromRows(dataRows) {
|
|
25
|
-
const products = [];
|
|
26
|
-
for (const dataRow of dataRows) {
|
|
27
|
-
const product = await this.createOrdersProductFromRow(dataRow);
|
|
28
|
-
products.push(product);
|
|
29
|
-
}
|
|
30
|
-
return products;
|
|
31
|
-
}
|
|
32
|
-
static async createOrdersProductFromRow(dataRow) {
|
|
33
|
-
const orderProduct = new OrderProduct(dataRow.order_id, dataRow.product_id, dataRow.net_price, dataRow.in_order);
|
|
34
|
-
orderProduct.setId(dataRow.id);
|
|
35
|
-
return orderProduct;
|
|
36
|
-
}
|
|
37
|
-
}
|
package/dist/repo/OrderRepo.d.ts
DELETED
package/dist/repo/OrderRepo.js
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import DatabaseConnection from "../DatabaseConnection";
|
|
2
|
-
import Order from "../stockObjects/Order";
|
|
3
|
-
export default class OrderRepo {
|
|
4
|
-
static async get(orderId) {
|
|
5
|
-
const connection = DatabaseConnection.get();
|
|
6
|
-
const orderData = await connection.orders.select(orderId);
|
|
7
|
-
return this.createOrderFromRow(orderData);
|
|
8
|
-
}
|
|
9
|
-
static createOrderFromRow(orderData) {
|
|
10
|
-
const order = new Order(orderData.email, orderData.price, orderData.client_id, orderData.contact_details_id, orderData.delivery_details_id, orderData.invoice_details_id, orderData.payment_details_id);
|
|
11
|
-
order.setId(orderData.id);
|
|
12
|
-
return order;
|
|
13
|
-
}
|
|
14
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import Status from "../stockObjects/Status";
|
|
2
|
-
export default class OrderStatusRepo {
|
|
3
|
-
static get(orderId: number): Promise<Status>;
|
|
4
|
-
static getAll(orderId: number): Promise<Status[]>;
|
|
5
|
-
private static createStatusesFromRows;
|
|
6
|
-
private static createStatusFromRow;
|
|
7
|
-
}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import DatabaseConnection from "../DatabaseConnection";
|
|
2
|
-
import Status from "../stockObjects/Status";
|
|
3
|
-
export default class OrderStatusRepo {
|
|
4
|
-
static async get(orderId) {
|
|
5
|
-
const connection = DatabaseConnection.get();
|
|
6
|
-
const status = await connection.statuses.selectLatest(orderId);
|
|
7
|
-
return this.createStatusFromRow(status);
|
|
8
|
-
}
|
|
9
|
-
static async getAll(orderId) {
|
|
10
|
-
const connection = DatabaseConnection.get();
|
|
11
|
-
const statuses = await connection.statuses.selectAllForOrder(orderId);
|
|
12
|
-
return this.createStatusesFromRows(statuses);
|
|
13
|
-
}
|
|
14
|
-
static async createStatusesFromRows(dataRows) {
|
|
15
|
-
const statuses = [];
|
|
16
|
-
for (const dataRow of dataRows) {
|
|
17
|
-
const status = await this.createStatusFromRow(dataRow);
|
|
18
|
-
statuses.push(status);
|
|
19
|
-
}
|
|
20
|
-
return statuses;
|
|
21
|
-
}
|
|
22
|
-
static async createStatusFromRow(dataRow) {
|
|
23
|
-
const status = new Status(dataRow.order_id, dataRow.user_id, dataRow.type_id, dataRow.type_name, dataRow.created_at);
|
|
24
|
-
status.setId(dataRow.id);
|
|
25
|
-
return status;
|
|
26
|
-
}
|
|
27
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import DatabaseConnection from "../DatabaseConnection";
|
|
2
|
-
import PaymentDetails from "../stockObjects/PaymentDetails";
|
|
3
|
-
export default class PaymentDetailsRepo {
|
|
4
|
-
static async get(paymentDetailsId) {
|
|
5
|
-
const connection = DatabaseConnection.get();
|
|
6
|
-
const paymentDetailsRow = await connection.paymentDetails.select(paymentDetailsId);
|
|
7
|
-
return this.createPaymentDetailsFromRow(paymentDetailsRow);
|
|
8
|
-
}
|
|
9
|
-
static createPaymentDetailsFromRow(paymentDetailsRow) {
|
|
10
|
-
const paymentDetails = new PaymentDetails(paymentDetailsRow.payment_method_id, String(paymentDetailsRow.payment_order_id));
|
|
11
|
-
paymentDetails.setId(paymentDetailsRow.id);
|
|
12
|
-
return paymentDetails;
|
|
13
|
-
}
|
|
14
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import DatabaseConnection from "../DatabaseConnection";
|
|
2
|
-
import PaymentMethods from "../stockObjects/PaymentMethods";
|
|
3
|
-
export default class PaymentMethodRepo {
|
|
4
|
-
static async get(id) {
|
|
5
|
-
const connection = DatabaseConnection.get();
|
|
6
|
-
const paymentMethodsRow = await connection.paymentMethods.select(id);
|
|
7
|
-
const paymentMethods = new PaymentMethods(paymentMethodsRow.key, paymentMethodsRow.active);
|
|
8
|
-
paymentMethods.setId(paymentMethodsRow.id);
|
|
9
|
-
return paymentMethods;
|
|
10
|
-
}
|
|
11
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import DatabaseConnection from "../DatabaseConnection";
|
|
2
|
-
import PersonalData from "../stockObjects/PersonalData";
|
|
3
|
-
import correctPhoneNumber from "../utils/correctPhoneNumber";
|
|
4
|
-
export default class PersonalDataRepo {
|
|
5
|
-
static async get(personalDataId) {
|
|
6
|
-
const connection = DatabaseConnection.get();
|
|
7
|
-
const personalData = await connection.personalData.select(personalDataId);
|
|
8
|
-
return this.createPersonalDataFromRow(personalData);
|
|
9
|
-
}
|
|
10
|
-
static createPersonalDataFromRow(dataRow) {
|
|
11
|
-
const phoneNumber = correctPhoneNumber(dataRow.phone_number);
|
|
12
|
-
const personalData = new PersonalData(dataRow.email, dataRow.first_name, dataRow.last_name, phoneNumber, dataRow.company_details_id);
|
|
13
|
-
personalData.setId(dataRow.id);
|
|
14
|
-
return personalData;
|
|
15
|
-
}
|
|
16
|
-
}
|
package/dist/repo/ProductRepo.js
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import DatabaseConnection from "../DatabaseConnection";
|
|
2
|
-
import Product from "../stockObjects/Product";
|
|
3
|
-
export default class ProductRepo {
|
|
4
|
-
static async get(productId) {
|
|
5
|
-
const connection = DatabaseConnection.get();
|
|
6
|
-
const product = await connection.products.select(productId);
|
|
7
|
-
return this.createProductFromRow(product);
|
|
8
|
-
}
|
|
9
|
-
static async getForSku(productSku) {
|
|
10
|
-
const connection = DatabaseConnection.get();
|
|
11
|
-
const product = await connection.products.selectForSku(productSku);
|
|
12
|
-
console.log(product);
|
|
13
|
-
return this.createProductFromRow(product);
|
|
14
|
-
}
|
|
15
|
-
static createProductFromRow(productRow) {
|
|
16
|
-
const product = new Product(productRow.sku, productRow.url, productRow.title, productRow.description, productRow.net_price, productRow.vat, productRow.color, productRow.quantity, productRow.width, productRow.length, productRow.height, productRow.file_id, productRow.deleted);
|
|
17
|
-
product.setId(productRow.id);
|
|
18
|
-
product.setCreatedAt(productRow.created_at);
|
|
19
|
-
return product;
|
|
20
|
-
}
|
|
21
|
-
}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import StockObject from "../types/StockObject";
|
|
2
|
-
import StockObjectMapper from "../types/StockObjectMapper";
|
|
3
|
-
export default class Address extends StockObject {
|
|
4
|
-
private country;
|
|
5
|
-
private city;
|
|
6
|
-
private street;
|
|
7
|
-
private postalCode;
|
|
8
|
-
private houseNumber;
|
|
9
|
-
private apartmentNumber;
|
|
10
|
-
constructor(country: string, city: string, street: string, postalCode: string, houseNumber: string, apartmentNumber?: string | null);
|
|
11
|
-
getData(): {
|
|
12
|
-
id: number | null;
|
|
13
|
-
country: string;
|
|
14
|
-
city: string;
|
|
15
|
-
street: string;
|
|
16
|
-
postalCode: string;
|
|
17
|
-
houseNumber: string;
|
|
18
|
-
apartmentNumber: string | null;
|
|
19
|
-
};
|
|
20
|
-
getCountry(): string;
|
|
21
|
-
getCity(): string;
|
|
22
|
-
getStreet(): string;
|
|
23
|
-
getPostalCode(): string;
|
|
24
|
-
getHouseNumber(): string;
|
|
25
|
-
getApartmentNumber(): string | null;
|
|
26
|
-
setCountry(country: string): void;
|
|
27
|
-
setCity(city: string): void;
|
|
28
|
-
setStreet(street: string): void;
|
|
29
|
-
setPostalCode(postalCode: string): void;
|
|
30
|
-
setHouseNumber(houseNumber: string): void;
|
|
31
|
-
setApartmentNumber(apartmentNumber: string): void;
|
|
32
|
-
protected getMapper(): StockObjectMapper;
|
|
33
|
-
}
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
import AddressMapper from "../mappers/AddressMapper";
|
|
2
|
-
import StockObject from "../types/StockObject";
|
|
3
|
-
export default class Address extends StockObject {
|
|
4
|
-
country;
|
|
5
|
-
city;
|
|
6
|
-
street;
|
|
7
|
-
postalCode;
|
|
8
|
-
houseNumber;
|
|
9
|
-
apartmentNumber;
|
|
10
|
-
constructor(country, city, street, postalCode, houseNumber, apartmentNumber = null) {
|
|
11
|
-
super();
|
|
12
|
-
this.country = country;
|
|
13
|
-
this.city = city;
|
|
14
|
-
this.street = street;
|
|
15
|
-
this.postalCode = postalCode;
|
|
16
|
-
this.houseNumber = houseNumber;
|
|
17
|
-
this.apartmentNumber = apartmentNumber;
|
|
18
|
-
}
|
|
19
|
-
getData() {
|
|
20
|
-
return {
|
|
21
|
-
id: this.getId(),
|
|
22
|
-
country: this.country,
|
|
23
|
-
city: this.city,
|
|
24
|
-
street: this.street,
|
|
25
|
-
postalCode: this.postalCode,
|
|
26
|
-
houseNumber: this.houseNumber,
|
|
27
|
-
apartmentNumber: this.apartmentNumber,
|
|
28
|
-
};
|
|
29
|
-
}
|
|
30
|
-
getCountry() {
|
|
31
|
-
return this.country;
|
|
32
|
-
}
|
|
33
|
-
getCity() {
|
|
34
|
-
return this.city;
|
|
35
|
-
}
|
|
36
|
-
getStreet() {
|
|
37
|
-
return this.street;
|
|
38
|
-
}
|
|
39
|
-
getPostalCode() {
|
|
40
|
-
return this.postalCode;
|
|
41
|
-
}
|
|
42
|
-
getHouseNumber() {
|
|
43
|
-
return this.houseNumber;
|
|
44
|
-
}
|
|
45
|
-
getApartmentNumber() {
|
|
46
|
-
return this.apartmentNumber;
|
|
47
|
-
}
|
|
48
|
-
setCountry(country) {
|
|
49
|
-
this.country = country;
|
|
50
|
-
}
|
|
51
|
-
setCity(city) {
|
|
52
|
-
this.city = city;
|
|
53
|
-
}
|
|
54
|
-
setStreet(street) {
|
|
55
|
-
this.street = street;
|
|
56
|
-
}
|
|
57
|
-
setPostalCode(postalCode) {
|
|
58
|
-
this.postalCode = postalCode;
|
|
59
|
-
}
|
|
60
|
-
setHouseNumber(houseNumber) {
|
|
61
|
-
this.houseNumber = houseNumber;
|
|
62
|
-
}
|
|
63
|
-
setApartmentNumber(apartmentNumber) {
|
|
64
|
-
this.apartmentNumber = apartmentNumber;
|
|
65
|
-
}
|
|
66
|
-
getMapper() {
|
|
67
|
-
return new AddressMapper(this);
|
|
68
|
-
}
|
|
69
|
-
}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import ClaimI from "../types/ClaimI";
|
|
2
|
-
import StockObject from "../types/StockObject";
|
|
3
|
-
import StockObjectMapper from "../types/StockObjectMapper";
|
|
4
|
-
export default class Admin extends StockObject {
|
|
5
|
-
private email;
|
|
6
|
-
private activated;
|
|
7
|
-
private deleted;
|
|
8
|
-
private firstName;
|
|
9
|
-
private lastName;
|
|
10
|
-
private createdAt;
|
|
11
|
-
private claims;
|
|
12
|
-
constructor(email: string, firstName: string, lastName: string, activated: boolean, deleted?: boolean, createdAt?: string | null);
|
|
13
|
-
getEmail(): string;
|
|
14
|
-
getActivated(): boolean;
|
|
15
|
-
getDeleted(): boolean;
|
|
16
|
-
getCreatedAt(): string | null;
|
|
17
|
-
getFirstName(): string;
|
|
18
|
-
getLastName(): string;
|
|
19
|
-
setActivated(activated: boolean): void;
|
|
20
|
-
setDeleted(deleted: boolean): void;
|
|
21
|
-
setFirstName(firstName: string): void;
|
|
22
|
-
setLastName(lastName: string): void;
|
|
23
|
-
setClaims(claims: ClaimI[]): void;
|
|
24
|
-
protected getMapper(): StockObjectMapper;
|
|
25
|
-
}
|