-
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.
feat: creating a relationship between consumer and permission
- Loading branch information
1 parent
f09e46f
commit b3c7e4a
Showing
4 changed files
with
23 additions
and
7 deletions.
There are no files selected for viewing
6 changes: 4 additions & 2 deletions
6
src/main/java/com/pedro/sphynx/application/dtos/consumer/ConsumerDataComplete.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,10 +1,12 @@ | ||
package com.pedro.sphynx.application.dtos.consumer; | ||
|
||
import com.pedro.sphynx.application.dtos.permission.PermissionDataComplete; | ||
import com.pedro.sphynx.infrastructure.entities.Consumer; | ||
import com.pedro.sphynx.infrastructure.entities.Permission; | ||
|
||
public record ConsumerDataComplete (Long id, String ra, String tag, int permission){ | ||
public record ConsumerDataComplete (Long id, String ra, String tag, PermissionDataComplete permission){ | ||
|
||
public ConsumerDataComplete(Consumer consumer){ | ||
this(consumer.getId(), consumer.getRa(), consumer.getTag(), consumer.getPermission()); | ||
this(consumer.getId(), consumer.getRa(), consumer.getTag(), new PermissionDataComplete(consumer.getPermission())); | ||
} | ||
} |
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