Skip to content

Commit

Permalink
Add intitution_id to transaction_account
Browse files Browse the repository at this point in the history
  • Loading branch information
ghacupha committed Nov 15, 2024
1 parent 58cbc70 commit fd6c0c0
Show file tree
Hide file tree
Showing 47 changed files with 2,939 additions and 60 deletions.
18 changes: 18 additions & 0 deletions .jhipster/ReportingEntity.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"fields": [
{
"fieldName": "entityName",
"fieldType": "String",
"fieldValidateRules": ["required", "unique"]
}
],
"relationships": [],
"service": "serviceImpl",
"dto": "mapstruct",
"jpaMetamodelFiltering": true,
"readOnly": false,
"pagination": "pagination",
"name": "ReportingEntity",
"changelogDate": "20241115103432",
"incrementalChangelog": false
}
7 changes: 7 additions & 0 deletions .jhipster/TransactionAccount.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,13 @@
"relationshipType": "many-to-one",
"relationshipValidateRules": ["required"],
"otherEntityField": "iso4217CurrencyCode"
},
{
"relationshipName": "institution",
"otherEntityName": "reportingEntity",
"relationshipType": "many-to-one",
"relationshipValidateRules": ["required"],
"otherEntityField": "entityName"
}
],
"service": "serviceImpl",
Expand Down
5 changes: 3 additions & 2 deletions .yo-rc.json
Original file line number Diff line number Diff line change
Expand Up @@ -314,15 +314,16 @@
"TAInterestPaidTransferRule",
"TACompilationRequest",
"RouInitialDirectCost",
"TransactionAccountLedger"
"TransactionAccountLedger",
"ReportingEntity"
],
"entitySuffix": "",
"incrementalChangelog": false,
"jhiPrefix": "jhi",
"jhipsterVersion": "7.3.1",
"jwtSecretKey": "ZWMyYzI1MmU3Mzg1ZTU4ZjFmOTIzYjEzOWZkZWU1MWZhNGY4ZTA3ZTEwYmYxMzczOGE3NDZiZjNkMDE3NjNiYTBmMTE0ODBiYTcyZDI0ZTcyNmU5OTA2NGY4NDUwZGEyMWQwYThmMTgxNWJiMjQ2OGQ0NmIxMTQwNTE0MGFkNzA=",
"languages": ["en", "fr", "it", "de"],
"lastLiquibaseTimestamp": 1731502548000,
"lastLiquibaseTimestamp": 1731666872000,
"messageBroker": "kafka",
"nativeLanguage": "en",
"otherModules": [],
Expand Down
12 changes: 6 additions & 6 deletions src/main/java/io/github/erp/domain/LeaseModelMetadata.java
Original file line number Diff line number Diff line change
Expand Up @@ -173,42 +173,42 @@ public class LeaseModelMetadata implements Serializable {

@ManyToOne
@JsonIgnoreProperties(
value = { "accountLedger", "accountCategory", "placeholders", "serviceOutlet", "settlementCurrency" },
value = { "accountLedger", "accountCategory", "placeholders", "serviceOutlet", "settlementCurrency", "institution" },
allowSetters = true
)
private TransactionAccount leaseLiabilityAccount;

@ManyToOne
@JsonIgnoreProperties(
value = { "accountLedger", "accountCategory", "placeholders", "serviceOutlet", "settlementCurrency" },
value = { "accountLedger", "accountCategory", "placeholders", "serviceOutlet", "settlementCurrency", "institution" },
allowSetters = true
)
private TransactionAccount interestPayableAccount;

@ManyToOne
@JsonIgnoreProperties(
value = { "accountLedger", "accountCategory", "placeholders", "serviceOutlet", "settlementCurrency" },
value = { "accountLedger", "accountCategory", "placeholders", "serviceOutlet", "settlementCurrency", "institution" },
allowSetters = true
)
private TransactionAccount interestExpenseAccount;

@ManyToOne
@JsonIgnoreProperties(
value = { "accountLedger", "accountCategory", "placeholders", "serviceOutlet", "settlementCurrency" },
value = { "accountLedger", "accountCategory", "placeholders", "serviceOutlet", "settlementCurrency", "institution" },
allowSetters = true
)
private TransactionAccount rouAssetAccount;

@ManyToOne
@JsonIgnoreProperties(
value = { "accountLedger", "accountCategory", "placeholders", "serviceOutlet", "settlementCurrency" },
value = { "accountLedger", "accountCategory", "placeholders", "serviceOutlet", "settlementCurrency", "institution" },
allowSetters = true
)
private TransactionAccount rouDepreciationAccount;

@ManyToOne
@JsonIgnoreProperties(
value = { "accountLedger", "accountCategory", "placeholders", "serviceOutlet", "settlementCurrency" },
value = { "accountLedger", "accountCategory", "placeholders", "serviceOutlet", "settlementCurrency", "institution" },
allowSetters = true
)
private TransactionAccount accruedDepreciationAccount;
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/io/github/erp/domain/PrepaymentAccount.java
Original file line number Diff line number Diff line change
Expand Up @@ -104,14 +104,14 @@ public class PrepaymentAccount implements Serializable {

@ManyToOne
@JsonIgnoreProperties(
value = { "accountLedger", "accountCategory", "placeholders", "serviceOutlet", "settlementCurrency" },
value = { "accountLedger", "accountCategory", "placeholders", "serviceOutlet", "settlementCurrency", "institution" },
allowSetters = true
)
private TransactionAccount debitAccount;

@ManyToOne
@JsonIgnoreProperties(
value = { "accountLedger", "accountCategory", "placeholders", "serviceOutlet", "settlementCurrency" },
value = { "accountLedger", "accountCategory", "placeholders", "serviceOutlet", "settlementCurrency", "institution" },
allowSetters = true
)
private TransactionAccount transferAccount;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,14 +86,14 @@ public class PrepaymentAmortization implements Serializable {

@ManyToOne
@JsonIgnoreProperties(
value = { "accountLedger", "accountCategory", "placeholders", "serviceOutlet", "settlementCurrency" },
value = { "accountLedger", "accountCategory", "placeholders", "serviceOutlet", "settlementCurrency", "institution" },
allowSetters = true
)
private TransactionAccount debitAccount;

@ManyToOne
@JsonIgnoreProperties(
value = { "accountLedger", "accountCategory", "placeholders", "serviceOutlet", "settlementCurrency" },
value = { "accountLedger", "accountCategory", "placeholders", "serviceOutlet", "settlementCurrency", "institution" },
allowSetters = true
)
private TransactionAccount creditAccount;
Expand Down
103 changes: 103 additions & 0 deletions src/main/java/io/github/erp/domain/ReportingEntity.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
package io.github.erp.domain;

/*-
* Erp System - Mark X No 10 (Jehoiada Series) Server ver 1.8.2
* Copyright © 2021 - 2024 Edwin Njeru and the ERP System Contributors ([email protected])
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

import java.io.Serializable;
import javax.persistence.*;
import javax.validation.constraints.*;
import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;

/**
* A ReportingEntity.
*/
@Entity
@Table(name = "reporting_entity")
@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
@org.springframework.data.elasticsearch.annotations.Document(indexName = "reportingentity")
public class ReportingEntity implements Serializable {

private static final long serialVersionUID = 1L;

@Id
@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "sequenceGenerator")
@SequenceGenerator(name = "sequenceGenerator")
@Column(name = "id")
private Long id;

@NotNull
@Column(name = "entity_name", nullable = false, unique = true)
private String entityName;

// jhipster-needle-entity-add-field - JHipster will add fields here

public Long getId() {
return this.id;
}

public ReportingEntity id(Long id) {
this.setId(id);
return this;
}

public void setId(Long id) {
this.id = id;
}

public String getEntityName() {
return this.entityName;
}

public ReportingEntity entityName(String entityName) {
this.setEntityName(entityName);
return this;
}

public void setEntityName(String entityName) {
this.entityName = entityName;
}

// jhipster-needle-entity-add-getters-setters - JHipster will add getters and setters here

@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (!(o instanceof ReportingEntity)) {
return false;
}
return id != null && id.equals(((ReportingEntity) o).id);
}

@Override
public int hashCode() {
// see https://vladmihalcea.com/how-to-implement-equals-and-hashcode-using-the-jpa-entity-identifier/
return getClass().hashCode();
}

// prettier-ignore
@Override
public String toString() {
return "ReportingEntity{" +
"id=" + getId() +
", entityName='" + getEntityName() + "'" +
"}";
}
}
4 changes: 2 additions & 2 deletions src/main/java/io/github/erp/domain/RouDepreciationEntry.java
Original file line number Diff line number Diff line change
Expand Up @@ -95,15 +95,15 @@ public class RouDepreciationEntry implements Serializable {
@ManyToOne(optional = false)
@NotNull
@JsonIgnoreProperties(
value = { "accountLedger", "accountCategory", "placeholders", "serviceOutlet", "settlementCurrency" },
value = { "accountLedger", "accountCategory", "placeholders", "serviceOutlet", "settlementCurrency", "institution" },
allowSetters = true
)
private TransactionAccount debitAccount;

@ManyToOne(optional = false)
@NotNull
@JsonIgnoreProperties(
value = { "accountLedger", "accountCategory", "placeholders", "serviceOutlet", "settlementCurrency" },
value = { "accountLedger", "accountCategory", "placeholders", "serviceOutlet", "settlementCurrency", "institution" },
allowSetters = true
)
private TransactionAccount creditAccount;
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/io/github/erp/domain/RouInitialDirectCost.java
Original file line number Diff line number Diff line change
Expand Up @@ -98,15 +98,15 @@ public class RouInitialDirectCost implements Serializable {
@ManyToOne(optional = false)
@NotNull
@JsonIgnoreProperties(
value = { "accountLedger", "accountCategory", "placeholders", "serviceOutlet", "settlementCurrency" },
value = { "accountLedger", "accountCategory", "placeholders", "serviceOutlet", "settlementCurrency", "institution" },
allowSetters = true
)
private TransactionAccount targetROUAccount;

@ManyToOne(optional = false)
@NotNull
@JsonIgnoreProperties(
value = { "accountLedger", "accountCategory", "placeholders", "serviceOutlet", "settlementCurrency" },
value = { "accountLedger", "accountCategory", "placeholders", "serviceOutlet", "settlementCurrency", "institution" },
allowSetters = true
)
private TransactionAccount transferAccount;
Expand Down
6 changes: 3 additions & 3 deletions src/main/java/io/github/erp/domain/RouModelMetadata.java
Original file line number Diff line number Diff line change
Expand Up @@ -117,23 +117,23 @@ public class RouModelMetadata implements Serializable {
@ManyToOne(optional = false)
@NotNull
@JsonIgnoreProperties(
value = { "accountLedger", "accountCategory", "placeholders", "serviceOutlet", "settlementCurrency" },
value = { "accountLedger", "accountCategory", "placeholders", "serviceOutlet", "settlementCurrency", "institution" },
allowSetters = true
)
private TransactionAccount assetAccount;

@ManyToOne(optional = false)
@NotNull
@JsonIgnoreProperties(
value = { "accountLedger", "accountCategory", "placeholders", "serviceOutlet", "settlementCurrency" },
value = { "accountLedger", "accountCategory", "placeholders", "serviceOutlet", "settlementCurrency", "institution" },
allowSetters = true
)
private TransactionAccount depreciationAccount;

@ManyToOne(optional = false)
@NotNull
@JsonIgnoreProperties(
value = { "accountLedger", "accountCategory", "placeholders", "serviceOutlet", "settlementCurrency" },
value = { "accountLedger", "accountCategory", "placeholders", "serviceOutlet", "settlementCurrency", "institution" },
allowSetters = true
)
private TransactionAccount accruedDepreciationAccount;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,15 +73,15 @@ public class TAInterestPaidTransferRule implements Serializable {
@ManyToOne(optional = false)
@NotNull
@JsonIgnoreProperties(
value = { "accountLedger", "accountCategory", "placeholders", "serviceOutlet", "settlementCurrency" },
value = { "accountLedger", "accountCategory", "placeholders", "serviceOutlet", "settlementCurrency", "institution" },
allowSetters = true
)
private TransactionAccount debit;

@ManyToOne(optional = false)
@NotNull
@JsonIgnoreProperties(
value = { "accountLedger", "accountCategory", "placeholders", "serviceOutlet", "settlementCurrency" },
value = { "accountLedger", "accountCategory", "placeholders", "serviceOutlet", "settlementCurrency", "institution" },
allowSetters = true
)
private TransactionAccount credit;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,15 +73,15 @@ public class TALeaseInterestAccrualRule implements Serializable {
@ManyToOne(optional = false)
@NotNull
@JsonIgnoreProperties(
value = { "accountLedger", "accountCategory", "placeholders", "serviceOutlet", "settlementCurrency" },
value = { "accountLedger", "accountCategory", "placeholders", "serviceOutlet", "settlementCurrency", "institution" },
allowSetters = true
)
private TransactionAccount debit;

@ManyToOne(optional = false)
@NotNull
@JsonIgnoreProperties(
value = { "accountLedger", "accountCategory", "placeholders", "serviceOutlet", "settlementCurrency" },
value = { "accountLedger", "accountCategory", "placeholders", "serviceOutlet", "settlementCurrency", "institution" },
allowSetters = true
)
private TransactionAccount credit;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,15 +73,15 @@ public class TALeaseRecognitionRule implements Serializable {
@ManyToOne(optional = false)
@NotNull
@JsonIgnoreProperties(
value = { "accountLedger", "accountCategory", "placeholders", "serviceOutlet", "settlementCurrency" },
value = { "accountLedger", "accountCategory", "placeholders", "serviceOutlet", "settlementCurrency", "institution" },
allowSetters = true
)
private TransactionAccount debit;

@ManyToOne(optional = false)
@NotNull
@JsonIgnoreProperties(
value = { "accountLedger", "accountCategory", "placeholders", "serviceOutlet", "settlementCurrency" },
value = { "accountLedger", "accountCategory", "placeholders", "serviceOutlet", "settlementCurrency", "institution" },
allowSetters = true
)
private TransactionAccount credit;
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/io/github/erp/domain/TALeaseRepaymentRule.java
Original file line number Diff line number Diff line change
Expand Up @@ -73,15 +73,15 @@ public class TALeaseRepaymentRule implements Serializable {
@ManyToOne(optional = false)
@NotNull
@JsonIgnoreProperties(
value = { "accountLedger", "accountCategory", "placeholders", "serviceOutlet", "settlementCurrency" },
value = { "accountLedger", "accountCategory", "placeholders", "serviceOutlet", "settlementCurrency", "institution" },
allowSetters = true
)
private TransactionAccount debit;

@ManyToOne(optional = false)
@NotNull
@JsonIgnoreProperties(
value = { "accountLedger", "accountCategory", "placeholders", "serviceOutlet", "settlementCurrency" },
value = { "accountLedger", "accountCategory", "placeholders", "serviceOutlet", "settlementCurrency", "institution" },
allowSetters = true
)
private TransactionAccount credit;
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/io/github/erp/domain/TARecognitionROURule.java
Original file line number Diff line number Diff line change
Expand Up @@ -73,15 +73,15 @@ public class TARecognitionROURule implements Serializable {
@ManyToOne(optional = false)
@NotNull
@JsonIgnoreProperties(
value = { "accountLedger", "accountCategory", "placeholders", "serviceOutlet", "settlementCurrency" },
value = { "accountLedger", "accountCategory", "placeholders", "serviceOutlet", "settlementCurrency", "institution" },
allowSetters = true
)
private TransactionAccount debit;

@ManyToOne(optional = false)
@NotNull
@JsonIgnoreProperties(
value = { "accountLedger", "accountCategory", "placeholders", "serviceOutlet", "settlementCurrency" },
value = { "accountLedger", "accountCategory", "placeholders", "serviceOutlet", "settlementCurrency", "institution" },
allowSetters = true
)
private TransactionAccount credit;
Expand Down
Loading

0 comments on commit fd6c0c0

Please sign in to comment.