-
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: update goal with list instead of int
Signed-off-by: Otavio Santana <[email protected]>
- Loading branch information
1 parent
13361f6
commit e846d04
Showing
2 changed files
with
17 additions
and
2 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 |
---|---|---|
@@ -1,11 +1,20 @@ | ||
package os.expert.sample; | ||
|
||
import jakarta.json.bind.annotation.JsonbProperty; | ||
import jakarta.json.bind.annotation.JsonbPropertyOrder; | ||
import jakarta.nosql.Column; | ||
import jakarta.nosql.Entity; | ||
import jakarta.nosql.Id; | ||
|
||
import java.util.List; | ||
|
||
@JsonbPropertyOrder({"id", "title", "description", "priority", "tasks"}) | ||
@Entity | ||
public record Goal(@Id String title, @Column String description, @Column int priority, @Column List<Task> tasks) { | ||
public record Goal( | ||
@Id @JsonbProperty("id") String id, | ||
@JsonbProperty("title") @Column String title, | ||
@JsonbProperty("description") @Column String description, | ||
@JsonbProperty("priority") @Column int priority, | ||
@JsonbProperty("tasks") @Column List<String> tasks) { | ||
|
||
} |
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