-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
70 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
...org/cardanofoundation/lob/app/accounting_reporting_core/mapper/DashboardViewToEntity.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
package org.cardanofoundation.lob.app.accounting_reporting_core.mapper; | ||
|
||
import org.cardanofoundation.lob.app.accounting_reporting_core.domain.entity.metric.DashboardEntity; | ||
import org.cardanofoundation.lob.app.accounting_reporting_core.resource.views.metric.DashboardView; | ||
import org.mapstruct.Mapper; | ||
import org.mapstruct.Mapping; | ||
|
||
@Mapper(componentModel = "spring") | ||
public interface DashboardViewToEntity { | ||
|
||
@Mapping(target = "id", ignore = true) | ||
@Mapping(target = "xPos", source = "dashboardView.XPos") | ||
@Mapping(target = "yPos", source = "dashboardView.YPos") | ||
DashboardEntity mapToDashboardEntity(DashboardView dashboardView, String organisationID); | ||
|
||
} |
5 changes: 4 additions & 1 deletion
5
...g/cardanofoundation/lob/app/accounting_reporting_core/repository/DashboardRepository.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,7 @@ | ||
package org.cardanofoundation.lob.app.accounting_reporting_core.repository; | ||
|
||
public interface DashboardRepository { | ||
import org.cardanofoundation.lob.app.accounting_reporting_core.domain.entity.metric.DashboardEntity; | ||
import org.springframework.data.jpa.repository.JpaRepository; | ||
|
||
public interface DashboardRepository extends JpaRepository<DashboardEntity, String> { | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
...ng_core/src/main/resources/db/migration/postgresql/common/V4__adding_dashboard_saving.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
CREATE TYPE accounting_core_metric_type AS ENUM ( | ||
'BALANCE_SHEET', | ||
'INCOME_STATEMENT' | ||
); | ||
|
||
CREATE TYPE account_core_submetric_type AS ENUM ( | ||
'ASSET_CATEGORIES', | ||
'BALANCE_SHEET_OVERVIEW', | ||
'TOTAL_EXPENSES', | ||
'INCOME_STREAMS' | ||
); | ||
|
||
CREATE TABLE IF NOT EXISTS accounting_core_dashboards ( | ||
id BIGINT PRIMARY KEY, | ||
organisation_id VARCHAR(255) NOT NULL, | ||
name VARCHAR(255) NOT NULL, | ||
description TEXT, | ||
x_pos DOUBLE PRECISION, | ||
y_pos DOUBLE PRECISION, | ||
width DOUBLE PRECISION, | ||
height DOUBLE PRECISION, | ||
metric accounting_core_metric_type NOT NULL, | ||
submetric account_core_submetric_type NOT NULL | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters