-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* [conluz-74] Generated ER diagram to represent conluz_db database visually with an image and in dbml format * [conluz-74] Replaced user by supply in plants. Added field isThirdParty on supply datadis fields. Added prefix 'datadis' to supply datadis fields * [conluz-74] Adapted method to retrieve Datadis consumptions to manage supplies that are not third party authorized supplies * [conluz-74] Supported isThirdParty setting for get and update supplies
- Loading branch information
1 parent
a1cf748
commit 92294f0
Showing
46 changed files
with
713 additions
and
431 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
// Use DBML to define your database structure | ||
// Docs: https://dbml.dbdiagram.io/docs | ||
|
||
Table "config" { | ||
"id" uuid [pk, not null] | ||
"default_admin_user_initialized" boolean [not null, default: false] | ||
} | ||
|
||
Table "databasechangelog" { | ||
"id" "character varying(255)" [not null] | ||
"author" "character varying(255)" [not null] | ||
"filename" "character varying(255)" [not null] | ||
"dateexecuted" timestamp [not null] | ||
"orderexecuted" integer [not null] | ||
"exectype" "character varying(10)" [not null] | ||
"md5sum" "character varying(35)" | ||
"description" "character varying(255)" | ||
"comments" "character varying(255)" | ||
"tag" "character varying(255)" | ||
"liquibase" "character varying(20)" | ||
"contexts" "character varying(255)" | ||
"labels" "character varying(255)" | ||
"deployment_id" "character varying(10)" | ||
} | ||
|
||
Table "databasechangeloglock" { | ||
"id" integer [pk, not null] | ||
"locked" boolean [not null] | ||
"lockgranted" timestamp | ||
"lockedby" "character varying(255)" | ||
} | ||
|
||
Table "datadis_config" { | ||
"id" uuid [pk, not null] | ||
"username" text | ||
"password" text | ||
} | ||
|
||
Table "huawei_config" { | ||
"id" uuid [pk, not null] | ||
"username" text | ||
"password" text | ||
} | ||
|
||
Table "users" { | ||
"id" uuid [pk, not null] | ||
"personal_id" "character varying(250)" [not null] | ||
"number" integer [not null] | ||
"password" "character varying(250)" [not null] | ||
"full_name" "character varying(250)" [not null] | ||
"address" "character varying(250)" | ||
"phone_number" "character varying(250)" | ||
"email" "character varying(250)" [not null] | ||
"role" "character varying(250)" [not null] | ||
"enabled" boolean [not null] | ||
} | ||
|
||
Table "plants" { | ||
"id" uuid [pk, not null] | ||
"name" text [not null] | ||
"code" text [not null] | ||
"address" text [not null] | ||
"description" text | ||
"inverter_provider" text [not null] | ||
"total_power" doubleprecision [not null] | ||
"connection_date" date | ||
"supply_id" uuid | ||
} | ||
Ref "plants_supply_id_fk":"supplies"."id" < "plants"."supply_id" | ||
|
||
Table "supplies" { | ||
"id" uuid [pk, not null] | ||
"code" "character varying(250)" [not null] | ||
"user_id" uuid | ||
"name" "character varying(250)" | ||
"address" "character varying(250)" [not null] | ||
"partition_coefficient" doubleprecision [not null] | ||
"enabled" boolean [not null] | ||
"shelly_mac" "character varying(250)" | ||
"shelly_id" "character varying(250)" | ||
"shelly_mqtt_prefix" "character varying(250)" | ||
"datadis_is_third_party" bool | ||
"datadis_valid_date_from" date | ||
"datadis_distributor" "character varying(250)" | ||
"datadis_distributor_code" "character varying(250)" | ||
"datadis_point_type" integer | ||
} | ||
Ref "supplies_user_id_fk":"users"."id" < "supplies"."user_id" |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
12 changes: 11 additions & 1 deletion
12
src/main/java/org/lucoenergia/conluz/domain/admin/supply/SupplyNotFoundException.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,16 +1,26 @@ | ||
package org.lucoenergia.conluz.domain.admin.supply; | ||
|
||
import org.lucoenergia.conluz.domain.shared.SupplyCode; | ||
import org.lucoenergia.conluz.domain.shared.SupplyId; | ||
|
||
public class SupplyNotFoundException extends RuntimeException { | ||
|
||
private final SupplyId id; | ||
private SupplyId id; | ||
private SupplyCode code; | ||
|
||
public SupplyNotFoundException(SupplyId id) { | ||
this.id = id; | ||
} | ||
|
||
public SupplyNotFoundException(SupplyCode code) { | ||
this.code = code; | ||
} | ||
|
||
public SupplyId getId() { | ||
return id; | ||
} | ||
|
||
public SupplyCode getCode() { | ||
return code; | ||
} | ||
} |
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
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
4 changes: 2 additions & 2 deletions
4
...ain/java/org/lucoenergia/conluz/domain/production/plant/create/CreatePlantRepository.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,9 +1,9 @@ | ||
package org.lucoenergia.conluz.domain.production.plant.create; | ||
|
||
import org.lucoenergia.conluz.domain.production.plant.Plant; | ||
import org.lucoenergia.conluz.domain.shared.UserId; | ||
import org.lucoenergia.conluz.domain.shared.SupplyId; | ||
|
||
public interface CreatePlantRepository { | ||
|
||
Plant create(Plant supply, UserId id); | ||
Plant create(Plant supply, SupplyId id); | ||
} |
Oops, something went wrong.