11package net .onelitefeather .vulpes .api .model ;
22
3+ import jakarta .persistence .CascadeType ;
34import jakarta .persistence .ElementCollection ;
45import jakarta .persistence .Entity ;
56import jakarta .persistence .GeneratedValue ;
67import jakarta .persistence .GenerationType ;
78import jakarta .persistence .Id ;
9+ import jakarta .persistence .OneToMany ;
10+ import jakarta .persistence .OneToOne ;
811import net .onelitefeather .vulpes .api .generator .VulpesGenerator ;
12+ import net .onelitefeather .vulpes .api .model .font .FontLoreEntity ;
913
1014import java .util .List ;
1115import java .util .UUID ;
@@ -34,8 +38,8 @@ public class FontEntity implements VulpesModel {
3438 private String comment ;
3539 private int height ;
3640 private int ascent ;
37- @ ElementCollection
38- private List <String > chars ;
41+ @ OneToMany ( cascade = CascadeType . ALL )
42+ private List <FontLoreEntity > chars ;
3943
4044 /**
4145 * Default constructor for JPA and Micronaut Data.
@@ -60,7 +64,17 @@ public FontEntity() {
6064 * @param ascent the ascent of the font
6165 * @param chars the list of characters included in the font
6266 */
63- public FontEntity (UUID id , String uiName , String variableName , String provider , String texturePath , String comment , int height , int ascent , List <String > chars ) {
67+ public FontEntity (
68+ UUID id ,
69+ String uiName ,
70+ String variableName ,
71+ String provider ,
72+ String texturePath ,
73+ String comment ,
74+ int height ,
75+ int ascent ,
76+ List <FontLoreEntity > chars
77+ ) {
6478 this .id = id ;
6579 this .uiName = uiName ;
6680 this .variableName = variableName ;
@@ -181,7 +195,7 @@ public void setHeight(int height) {
181195 *
182196 * @return the list of characters in the font
183197 */
184- public List <String > getChars () {
198+ public List <FontLoreEntity > getChars () {
185199 return chars ;
186200 }
187201
@@ -190,7 +204,7 @@ public List<String> getChars() {
190204 *
191205 * @param chars the list of characters to set
192206 */
193- public void setChars (List <String > chars ) {
207+ public void setChars (List <FontLoreEntity > chars ) {
194208 this .chars = chars ;
195209 }
196210
0 commit comments