Removing unnecessary constructors
Project: http://git-wip-us.apache.org/repos/asf/fineract/repo Commit: http://git-wip-us.apache.org/repos/asf/fineract/commit/58184a52 Tree: http://git-wip-us.apache.org/repos/asf/fineract/tree/58184a52 Diff: http://git-wip-us.apache.org/repos/asf/fineract/diff/58184a52 Branch: refs/heads/develop Commit: 58184a5219d6bd2275bbe323c0848c4daa6f4471 Parents: 0693213 Author: Avik Ganguly <av...@apache.org> Authored: Wed Dec 13 16:52:20 2017 +0530 Committer: Avik Ganguly <av...@apache.org> Committed: Wed Dec 13 18:04:36 2017 +0530 ---------------------------------------------------------------------- .../importhandler/group/GroupImportHandler.java | 2 +- .../portfolio/client/data/ClientData.java | 135 ++------------- .../loanaccount/data/LoanAccountData.java | 168 ++----------------- .../data/SavingsAccountTransactionData.java | 3 +- .../core_db/V336__m_import_document.sql | 39 ----- .../core_db/V341__m_import_document.sql | 39 +++++ 6 files changed, 69 insertions(+), 317 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/fineract/blob/58184a52/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/importhandler/group/GroupImportHandler.java ---------------------------------------------------------------------- diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/importhandler/group/GroupImportHandler.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/importhandler/group/GroupImportHandler.java index 068e874..ada465d 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/importhandler/group/GroupImportHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/importhandler/group/GroupImportHandler.java @@ -131,7 +131,7 @@ public class GroupImportHandler implements ImportHandler { if (clientName==null) break; Long clientId = ImportHandlerUtils.getIdByName(workbook.getSheet(TemplatePopulateImportConstants.CLIENT_SHEET_NAME), clientName); - ClientData clientData = new ClientData(clientId); + ClientData clientData = ClientData.emptyInstance(clientId); if (!containsClientId(clientMembers,clientId)) { clientMembers.add(clientData); } http://git-wip-us.apache.org/repos/asf/fineract/blob/58184a52/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/data/ClientData.java ---------------------------------------------------------------------- diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/data/ClientData.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/data/ClientData.java index bed206f..96f136d 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/data/ClientData.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/data/ClientData.java @@ -123,30 +123,36 @@ final public class ClientData implements Comparable<ClientData> { Long clientClassificationId,Long staffId,Boolean active,LocalDate activationDate,LocalDate submittedOnDate, String externalId,LocalDate dateOfBirth,String mobileNo,ClientNonPersonData clientNonPersonDetails, AddressData address,String locale,String dateFormat){ - return new ClientData(legalFormId,rowIndex,fullname,officeId,clientTypeId,clientClassificationId, - staffId,active,activationDate,submittedOnDate, externalId,dateOfBirth,mobileNo,clientNonPersonDetails,address, - locale,dateFormat); + return new ClientData(legalFormId,rowIndex,fullname, null, null, null, submittedOnDate,activationDate,active, externalId, + officeId, staffId,mobileNo,dateOfBirth,clientTypeId, null,clientClassificationId,null, + address,clientNonPersonDetails, locale,dateFormat); } public static ClientData importClientPersonInstance(Long legalFormId,Integer rowIndex,String firstName,String lastName,String middleName, LocalDate submittedOn,LocalDate activationDate,Boolean active,String externalId,Long officeId, Long staffId,String mobileNo, LocalDate dob,Long clientTypeId,Long genderId, - Long clientClassificationId,Boolean isStaff,AddressData address,String locale,String dateFormat){ + Long clientClassificationId, Boolean isStaff, AddressData address,String locale,String dateFormat){ - return new ClientData(legalFormId,rowIndex,firstName,lastName,middleName,submittedOn,activationDate,active,externalId, - officeId,staffId,mobileNo,dob,clientTypeId,genderId,clientClassificationId,isStaff,address,locale,dateFormat); + return new ClientData(legalFormId,rowIndex, null, firstName,lastName,middleName,submittedOn,activationDate,active,externalId, + officeId,staffId,mobileNo,dob,clientTypeId,genderId,clientClassificationId,isStaff,address, null, locale,dateFormat); + } + + public static ClientData emptyInstance(Long clientId) { + return lookup(clientId, null, null, null); } - private ClientData(Long legalFormId,Integer rowIndex,String firstname,String lastname,String middlename, + private ClientData(Long legalFormId,Integer rowIndex, String fullname, String firstname,String lastname,String middlename, LocalDate submittedOn,LocalDate activationDate,Boolean active,String externalId,Long officeId, Long staffId,String mobileNo, LocalDate dob,Long clientTypeId,Long genderId, - Long clientClassificationId,Boolean isStaff,AddressData address,String locale,String dateFormat ) { + Long clientClassificationId,Boolean isStaff, AddressData address, ClientNonPersonData clientNonPersonDetails, + String locale,String dateFormat ) { this.rowIndex=rowIndex; this.dateFormat=dateFormat; this.locale= locale; this.firstname = firstname; this.lastname = lastname; this.middlename = middlename; + this.fullname = fullname; this.activationDate=activationDate; this.submittedOnDate=submittedOn; this.active=active; @@ -165,7 +171,6 @@ final public class ClientData implements Comparable<ClientData> { this.accountNo = null; this.status = null; this.subStatus = null; - this.fullname = null; this.displayName = null; this.gender = null; this.clientType = null; @@ -197,120 +202,10 @@ final public class ClientData implements Comparable<ClientData> { this.isAddressEnabled =null; this.datatables = null; this.familyMemberOptions=null; + this.emailAddress = null; } - private ClientData(Long legalFormId,Integer rowIndex,String fullname,Long officeId, Long clientTypeId, - Long clientClassificationId,Long staffId,Boolean active,LocalDate activationDate,LocalDate submittedOnDate, - String externalId,LocalDate dateOfBirth,String mobileNo,ClientNonPersonData clientNonPersonDetails, - AddressData address,String locale,String dateFormat) { - this.id = null; - this.accountNo = null; - this.externalId = externalId; - this.status = null; - this.subStatus = null; - this.active = active; - this.activationDate = activationDate; - this.firstname = null; - this.middlename = null; - this.lastname = null; - this.fullname = fullname; - this.displayName = null; - this.mobileNo = mobileNo; - this.dateOfBirth = dateOfBirth; - this.gender = null; - this.clientType = null; - this.clientClassification = null; - this.isStaff = null; - this.officeId = officeId; - this.officeName = null; - this.transferToOfficeId = null; - this.transferToOfficeName = null; - this.imageId = null; - this.imagePresent = null; - this.staffId = staffId; - this.staffName = null; - this.timeline = null; - this.savingsProductId = null; - this.savingsProductName = null; - this.savingsAccountId = null; - this.legalForm = null; - this.groups = null; - this.officeOptions = null; - this.staffOptions = null; - this.narrations = null; - this.savingProductOptions = null; - this.savingAccountOptions = null; - this.genderOptions = null; - this.clientTypeOptions = null; - this.clientClassificationOptions = null; - this.clientNonPersonConstitutionOptions = null; - this.clientNonPersonMainBusinessLineOptions = null; - this.clientLegalFormOptions = null; - this.clientNonPersonDetails = clientNonPersonDetails; - this.address = address; - this.isAddressEnabled = null; - this.datatables = null; - this.rowIndex = rowIndex; - this.dateFormat=dateFormat; - this.locale= locale; - this.clientTypeId = clientTypeId; - this.genderId = null; - this.clientClassificationId = clientClassificationId; - this.legalFormId = legalFormId; - this.submittedOnDate = submittedOnDate; - this.familyMemberOptions=null; - } - public ClientData(Long id) { - this.id = id; - this.accountNo = null; - this.externalId = null; - this.status = null; - this.subStatus = null; - this.active = null; - this.activationDate = null; - this.firstname = null; - this.middlename = null; - this.lastname = null; - this.fullname = null; - this.displayName = null; - this.mobileNo = null; - this.dateOfBirth = null; - this.gender = null; - this.clientType = null; - this.clientClassification = null; - this.isStaff = null; - this.officeId = null; - this.officeName = null; - this.transferToOfficeId = null; - this.transferToOfficeName = null; - this.imageId = null; - this.imagePresent = null; - this.staffId = null; - this.staffName = null; - this.timeline = null; - this.savingsProductId = null; - this.savingsProductName = null; - this.savingsAccountId = null; - this.legalForm = null; - this.groups = null; - this.officeOptions = null; - this.staffOptions = null; - this.narrations = null; - this.savingProductOptions = null; - this.savingAccountOptions = null; - this.genderOptions = null; - this.clientTypeOptions = null; - this.clientClassificationOptions = null; - this.clientNonPersonConstitutionOptions = null; - this.clientNonPersonMainBusinessLineOptions = null; - this.clientLegalFormOptions = null; - this.clientNonPersonDetails = null; - this.address = null; - this.isAddressEnabled = null; - this.datatables = null; - this.familyMemberOptions=null; - } public Integer getRowIndex() { return rowIndex; http://git-wip-us.apache.org/repos/asf/fineract/blob/58184a52/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/data/LoanAccountData.java ---------------------------------------------------------------------- diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/data/LoanAccountData.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/data/LoanAccountData.java index 2cdbfb8..0432cbb 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/data/LoanAccountData.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/data/LoanAccountData.java @@ -248,153 +248,6 @@ public class LoanAccountData { rowIndex, externalId, null, charges, linkAccountId,locale,dateFormat); } - private LoanAccountData(EnumOptionData loanType,Long clientId,Long productId,Long loanOfficerId,LocalDate submittedOnDate, - Long fundId,BigDecimal principal, Integer numberOfRepayments,Integer repaymentEvery, - EnumOptionData repaymentFrequencyType, Integer loanTermFrequency,EnumOptionData loanTermFrequencyType, - BigDecimal interestRatePerPeriod,LocalDate expectedDisbursementDate ,EnumOptionData amortizationType, - EnumOptionData interestType, EnumOptionData interestCalculationPeriodType,BigDecimal inArrearsTolerance,Long transactionProcessingStrategyId, - Integer graceOnPrincipalPayment,Integer graceOnInterestPayment,Integer graceOnInterestCharged, - LocalDate interestChargedFromDate,LocalDate repaymentsStartingFromDate,Integer rowIndex , - String externalId,Long groupId,Collection<LoanChargeData> charges,String linkAccountId, - String locale,String dateFormat) { - this.dateFormat=dateFormat; - this.locale= locale; - this.rowIndex=rowIndex; - this.submittedOnDate=submittedOnDate; - this.productId=productId; - this.loanTermFrequency=loanTermFrequency; - this.loanTermFrequencyType=loanTermFrequencyType; - this.repaymentsStartingFromDate=repaymentsStartingFromDate; - this.linkAccountId=linkAccountId; - this.externalId = externalId; - this.clientId = clientId; - this.fundId = fundId; - this.loanOfficerId = loanOfficerId; - this.numberOfRepayments = numberOfRepayments; - this.loanType = loanType; - this.principal = principal; - this.repaymentEvery = repaymentEvery; - this.repaymentFrequencyType = repaymentFrequencyType; - this.interestRatePerPeriod = interestRatePerPeriod; - this.amortizationType = amortizationType; - this.interestType = interestType; - this.interestCalculationPeriodType = interestCalculationPeriodType; - this.inArrearsTolerance = inArrearsTolerance; - this.transactionProcessingStrategyId = transactionProcessingStrategyId; - this.graceOnInterestPayment = graceOnInterestPayment; - this.graceOnInterestCharged = graceOnInterestCharged; - this.graceOnPrincipalPayment = graceOnPrincipalPayment; - this.interestChargedFromDate = interestChargedFromDate; - this.groupId=groupId; - this.expectedDisbursementDate=expectedDisbursementDate; - this.charges = charges; - this.id = null; - this.accountNo = null; - - this.status = null; - this.subStatus = null; - - this.clientAccountNo = null; - this.clientName = null; - this.clientOfficeId = null; - this.group = null; - this.loanProductId = null; - this.loanProductName = null; - this.loanProductDescription = null; - this.isLoanProductLinkedToFloatingRate = false; - - this.fundName = null; - this.loanPurposeId = null; - this.loanPurposeName = null; - - this.loanOfficerName = null; - - this.currency = null; - - this.approvedPrincipal = null; - this.proposedPrincipal = null; - this.termFrequency = null; - this.termPeriodFrequencyType = null; - - - this.repaymentFrequencyNthDayType = null; - this.repaymentFrequencyDayOfWeekType = null; - - this.interestRateFrequencyType = null; - this.annualInterestRate = null; - this.isFloatingInterestRate = false; - this.interestRateDifferential = null; - - this.allowPartialPeriodInterestCalcualtion = null; - - this.transactionProcessingStrategyName = null; - - this.recurringMoratoriumOnPrincipalPeriods = null; - - this.graceOnArrearsAgeing = null; - - this.expectedFirstRepaymentOnDate = null; - this.syncDisbursementWithMeeting = null; - this.timeline = null; - this.summary = null; - this.repaymentSchedule = null; - this.transactions = null; - - this.collateral = null; - this.guarantors = null; - this.meeting = null; - this.notes = null; - this.disbursementDetails = null; - this.originalSchedule = null; - this.productOptions = null; - this.loanOfficerOptions = null; - this.loanPurposeOptions = null; - this.fundOptions = null; - this.termFrequencyTypeOptions = null; - this.repaymentFrequencyTypeOptions = null; - this.repaymentFrequencyNthDayTypeOptions = null; - this.repaymentFrequencyDaysOfWeekTypeOptions = null; - this.interestRateFrequencyTypeOptions = null; - this.amortizationTypeOptions = null; - this.interestTypeOptions = null; - this.interestCalculationPeriodTypeOptions = null; - this.transactionProcessingStrategyOptions = null; - this.chargeOptions = null; - this.loanCollateralOptions = null; - this.calendarOptions = null; - this.feeChargesAtDisbursementCharged = null; - this.totalOverpaid = null; - this.loanCounter = null; - this.loanProductCounter = null; - this.linkedAccount = null; - this.accountLinkingOptions = null; - this.multiDisburseLoan = null; - this.canDefineInstallmentAmount = null; - this.fixedEmiAmount = null; - this.maxOutstandingLoanBalance = null; - this.canDisburse = null; - this.emiAmountVariations = null; - this.clientActiveLoanOptions = null; - this.canUseForTopup = null; - this.isTopup = false; - this.closureLoanId = null; - this.closureLoanAccountNo = null; - this.topupAmount = null; - this.memberVariations = null; - this.inArrears = null; - this.isNPA = null; - this.overdueCharges = null; - this.daysInMonthType = null; - this.daysInYearType = null; - this.isInterestRecalculationEnabled = false; - this.interestRecalculationData = null; - this.createStandingInstructionAtDisbursement = null; - this.paidInAdvance = null; - this.interestRatesPeriods = null; - this.isVariableInstallmentsAllowed = null; - this.minimumGap = null; - this.maximumGap = null; - } public static LoanAccountData importInstanceGroup(EnumOptionData loanTypeEnumOption,Long groupIdforGroupLoan,Long productId, Long loanOfficerId,LocalDate submittedOnDate, @@ -409,20 +262,21 @@ public class LoanAccountData { return new LoanAccountData(loanTypeEnumOption, groupIdforGroupLoan, productId, loanOfficerId, submittedOnDate, fundId, principal, numberOfRepayments, - repaidEvery, repaidEveryFrequencyEnums, loanTermFrequency, loanTermFrequencyTypeEnum, nominalInterestRate, + repaidEvery, repaidEveryFrequencyEnums, loanTermFrequency, loanTermFrequencyTypeEnum, nominalInterestRate, null, amortizationEnumOption, interestMethodEnum, interestCalculationPeriodEnum, arrearsTolerance, transactionProcessingStrategyId, graceOnPrincipalPayment, graceOnInterestPayment, graceOnInterestCharged, - interestChargedFromDate, repaymentsStartingFromDate, rowIndex, externalId, linkAccountId,locale,dateFormat); + interestChargedFromDate, repaymentsStartingFromDate, rowIndex, externalId, null, null, linkAccountId,locale,dateFormat); } + private LoanAccountData(EnumOptionData loanType,Long clientId,Long productId,Long loanOfficerId,LocalDate submittedOnDate, Long fundId,BigDecimal principal, Integer numberOfRepayments,Integer repaymentEvery, EnumOptionData repaymentFrequencyType, Integer loanTermFrequency,EnumOptionData loanTermFrequencyType, - BigDecimal interestRatePerPeriod, EnumOptionData amortizationType,EnumOptionData interestType, - EnumOptionData interestCalculationPeriodType,BigDecimal inArrearsTolerance, - Long transactionProcessingStrategyId, + BigDecimal interestRatePerPeriod,LocalDate expectedDisbursementDate ,EnumOptionData amortizationType, + EnumOptionData interestType, EnumOptionData interestCalculationPeriodType,BigDecimal inArrearsTolerance,Long transactionProcessingStrategyId, Integer graceOnPrincipalPayment,Integer graceOnInterestPayment,Integer graceOnInterestCharged, - LocalDate interestChargedFromDate,LocalDate repaymentsStartingFromDate, - Integer rowIndex ,String externalId,String linkAccountId,String locale,String dateFormat) { + LocalDate interestChargedFromDate,LocalDate repaymentsStartingFromDate,Integer rowIndex , + String externalId,Long groupId,Collection<LoanChargeData> charges,String linkAccountId, + String locale,String dateFormat) { this.dateFormat=dateFormat; this.locale= locale; this.rowIndex=rowIndex; @@ -451,8 +305,9 @@ public class LoanAccountData { this.graceOnInterestCharged = graceOnInterestCharged; this.graceOnPrincipalPayment = graceOnPrincipalPayment; this.interestChargedFromDate = interestChargedFromDate; - this.groupId=null; - this.charges = null; + this.groupId=groupId; + this.expectedDisbursementDate=expectedDisbursementDate; + this.charges = charges; this.id = null; this.accountNo = null; @@ -559,6 +414,7 @@ public class LoanAccountData { this.isVariableInstallmentsAllowed = null; this.minimumGap = null; this.maximumGap = null; + this.isEqualAmortization = null; } http://git-wip-us.apache.org/repos/asf/fineract/blob/58184a52/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/data/SavingsAccountTransactionData.java ---------------------------------------------------------------------- diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/data/SavingsAccountTransactionData.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/data/SavingsAccountTransactionData.java index 6bc6f6a..98bee06 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/data/SavingsAccountTransactionData.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/data/SavingsAccountTransactionData.java @@ -21,7 +21,6 @@ package org.apache.fineract.portfolio.savings.data; import java.math.BigDecimal; import java.util.Collection; -import org.apache.fineract.infrastructure.bulkimport.constants.TemplatePopulateImportConstants; import org.apache.fineract.infrastructure.codes.data.CodeValueData; import org.apache.fineract.infrastructure.core.service.DateUtils; import org.apache.fineract.organisation.monetary.data.CurrencyData; @@ -111,6 +110,8 @@ public class SavingsAccountTransactionData { this.receiptNumber = receiptNumber; this.bankNumber = bankNumber; this.paymentTypeOptions = null; + this.submittedByUsername = null; + this.note = null; } public Integer getRowIndex() { http://git-wip-us.apache.org/repos/asf/fineract/blob/58184a52/fineract-provider/src/main/resources/sql/migrations/core_db/V336__m_import_document.sql ---------------------------------------------------------------------- diff --git a/fineract-provider/src/main/resources/sql/migrations/core_db/V336__m_import_document.sql b/fineract-provider/src/main/resources/sql/migrations/core_db/V336__m_import_document.sql deleted file mode 100644 index 386016e..0000000 --- a/fineract-provider/src/main/resources/sql/migrations/core_db/V336__m_import_document.sql +++ /dev/null @@ -1,39 +0,0 @@ --- --- Licensed to the Apache Software Foundation (ASF) under one --- or more contributor license agreements. See the NOTICE file --- distributed with this work for additional information --- regarding copyright ownership. The ASF licenses this file --- to you under the Apache License, Version 2.0 (the --- "License"); you may not use this file except in compliance --- with the License. You may obtain a copy of the License at --- --- http://www.apache.org/licenses/LICENSE-2.0 --- --- Unless required by applicable law or agreed to in writing, --- software distributed under the License is distributed on an --- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY --- KIND, either express or implied. See the License for the --- specific language governing permissions and limitations --- under the License. --- - -CREATE TABLE `m_import_document` ( - `id` bigint(20) NOT NULL AUTO_INCREMENT, - `document_id` int(20) NOT NULL, - `import_time` datetime NOT NULL, - `end_time` datetime DEFAULT NULL, - `entity_type` tinyint(3) NOT NULL, - `completed` tinyint(2) DEFAULT 0, - `total_records` bigint(20) DEFAULT 0, - `success_count` bigint(20) DEFAULT 0, - `failure_count` bigint(20) DEFAULT 0, - `createdby_id` bigint(20) DEFAULT NULL, - PRIMARY KEY (`id`), - KEY `import_document_id` (`document_id`), - CONSTRAINT `FK_m_import_m_document` FOREIGN KEY (`document_id`) REFERENCES `m_document` (`id`), - CONSTRAINT `FK_m_import_m_appuser` FOREIGN KEY (`createdby_id`) REFERENCES `m_appuser` (`id`) -); - -INSERT INTO `m_permission` -(`grouping`,`code`,`entity_name`,`action_name`,`can_maker_checker`) VALUES -('infrastructure','READ_IMPORT','IMPORT','READ', 0); \ No newline at end of file http://git-wip-us.apache.org/repos/asf/fineract/blob/58184a52/fineract-provider/src/main/resources/sql/migrations/core_db/V341__m_import_document.sql ---------------------------------------------------------------------- diff --git a/fineract-provider/src/main/resources/sql/migrations/core_db/V341__m_import_document.sql b/fineract-provider/src/main/resources/sql/migrations/core_db/V341__m_import_document.sql new file mode 100644 index 0000000..386016e --- /dev/null +++ b/fineract-provider/src/main/resources/sql/migrations/core_db/V341__m_import_document.sql @@ -0,0 +1,39 @@ +-- +-- Licensed to the Apache Software Foundation (ASF) under one +-- or more contributor license agreements. See the NOTICE file +-- distributed with this work for additional information +-- regarding copyright ownership. The ASF licenses this file +-- to you under the Apache License, Version 2.0 (the +-- "License"); you may not use this file except in compliance +-- with the License. You may obtain a copy of the License at +-- +-- http://www.apache.org/licenses/LICENSE-2.0 +-- +-- Unless required by applicable law or agreed to in writing, +-- software distributed under the License is distributed on an +-- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +-- KIND, either express or implied. See the License for the +-- specific language governing permissions and limitations +-- under the License. +-- + +CREATE TABLE `m_import_document` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `document_id` int(20) NOT NULL, + `import_time` datetime NOT NULL, + `end_time` datetime DEFAULT NULL, + `entity_type` tinyint(3) NOT NULL, + `completed` tinyint(2) DEFAULT 0, + `total_records` bigint(20) DEFAULT 0, + `success_count` bigint(20) DEFAULT 0, + `failure_count` bigint(20) DEFAULT 0, + `createdby_id` bigint(20) DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `import_document_id` (`document_id`), + CONSTRAINT `FK_m_import_m_document` FOREIGN KEY (`document_id`) REFERENCES `m_document` (`id`), + CONSTRAINT `FK_m_import_m_appuser` FOREIGN KEY (`createdby_id`) REFERENCES `m_appuser` (`id`) +); + +INSERT INTO `m_permission` +(`grouping`,`code`,`entity_name`,`action_name`,`can_maker_checker`) VALUES +('infrastructure','READ_IMPORT','IMPORT','READ', 0); \ No newline at end of file