Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
import jakarta.persistence.Id;
import net.theevilreaper.vulpes.api.generator.VulpesGenerator;

import javax.annotation.processing.Generated;
import java.util.UUID;

/**
Expand All @@ -19,7 +18,7 @@
* </p>
*/
@Entity(name = "attributes")
public class AttributeModel implements VulpesModel {
public class AttributeEntity implements VulpesModel {

@Id
@GeneratedValue(strategy = GenerationType.UUID)
Expand All @@ -36,20 +35,20 @@ public class AttributeModel implements VulpesModel {
* This constructor is required for the JPA provider to instantiate the entity.
* </p>
*/
public AttributeModel() {
public AttributeEntity() {
// No-argument constructor for JPA
}

/**
* Constructs a new {@link AttributeModel} with the specified values.
* Constructs a new {@link AttributeEntity} with the specified values.
*
* @param id the unique identifier of the attribute
* @param modelName the model name associated with the attribute
* @param name the name of the attribute
* @param defaultValue the default value of the attribute
* @param maximumValue the maximum value of the attribute
*/
public AttributeModel(UUID id, String modelName, String name, double defaultValue, double maximumValue) {
public AttributeEntity(UUID id, String modelName, String name, double defaultValue, double maximumValue) {
this.id = id;
this.modelName = modelName;
this.name = name;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
* </p>
*/
@Entity(name = "fonts")
public class FontModel implements VulpesModel {
public class FontEntity implements VulpesModel {

@Id
@GeneratedValue(strategy = GenerationType.UUID)
Expand All @@ -43,12 +43,12 @@ public class FontModel implements VulpesModel {
* This constructor is required for the JPA provider to instantiate the entity.
* </p>
*/
public FontModel() {
public FontEntity() {
// No-argument constructor for JPA
}

/**
* Constructs a new {@link FontModel} with the specified values.
* Constructs a new {@link FontEntity} with the specified values.
*
* @param id the unique identifier of the font
* @param modelName the model name associated with the font
Expand All @@ -60,7 +60,7 @@ public FontModel() {
* @param chars the list of characters included in the font
* @param shift the list of shift values for the font
*/
public FontModel(UUID id, String modelName, String name, String description, String type, int ascent, int height, List<String> chars, List<Double> shift) {
public FontEntity(UUID id, String modelName, String name, String description, String type, int ascent, int height, List<String> chars, List<Double> shift) {
this.id = id;
this.modelName = modelName;
this.name = name;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
* </p>
*/
@Entity(name = "items")
public class ItemModel implements VulpesModel {
public class ItemEntity implements VulpesModel {

@Id
@GeneratedValue(strategy = GenerationType.UUID)
Expand Down Expand Up @@ -49,12 +49,12 @@ public class ItemModel implements VulpesModel {
* This constructor is required for the JPA provider to instantiate the entity.
* </p>
*/
public ItemModel() {
public ItemEntity() {
// No-argument constructor for JPA
}

/**
* Constructs a new {@link ItemModel} with the specified values.
* Constructs a new {@link ItemEntity} with the specified values.
*
* @param id the unique identifier of the item
* @param modelName the model name associated with the item
Expand All @@ -69,7 +69,7 @@ public ItemModel() {
* @param lore the lore associated with the item
* @param flags the flags associated with the item
*/
public ItemModel(UUID id, String modelName, String name, String description, String displayName, String material, String groupName, int customModelData, int amount, Map<String, Short> enchantments, List<String> lore, List<String> flags) {
public ItemEntity(UUID id, String modelName, String name, String description, String displayName, String material, String groupName, int customModelData, int amount, Map<String, Short> enchantments, List<String> lore, List<String> flags) {
this.id = id;
this.modelName = modelName;
this.name = name;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
* </p>
*/
@Entity(name = "notifications")
public class NotificationModel implements VulpesModel {
public class NotificationEntity implements VulpesModel {

@Id
@GeneratedValue(strategy = GenerationType.UUID)
Expand All @@ -37,12 +37,12 @@ public class NotificationModel implements VulpesModel {
* This constructor is required for the JPA provider to instantiate the entity.
* </p>
*/
public NotificationModel() {
public NotificationEntity() {
// No-argument constructor for JPA
}

/**
* Constructs a new {@link NotificationModel} with the specified values.
* Constructs a new {@link NotificationEntity} with the specified values.
*
* @param id the unique identifier of the notification
* @param modelName the model name associated with the notification
Expand All @@ -52,7 +52,7 @@ public NotificationModel() {
* @param frameType the frame type associated with the notification
* @param title the title of the notification
*/
public NotificationModel(UUID id, String modelName, String name, String description, String material, String frameType, String title) {
public NotificationEntity(UUID id, String modelName, String name, String description, String material, String frameType, String title) {
this.id = id;
this.modelName = modelName;
this.name = name;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,8 @@
import jakarta.persistence.GeneratedValue;
import jakarta.persistence.GenerationType;
import jakarta.persistence.Id;
import net.theevilreaper.vulpes.api.generator.UuidV7Generator;
import net.theevilreaper.vulpes.api.generator.VulpesGenerator;
import net.theevilreaper.vulpes.api.model.VulpesModel;
import org.hibernate.annotations.GenericGenerator;
import org.hibernate.annotations.IdGeneratorType;

import java.util.UUID;

Expand All @@ -22,7 +19,7 @@
* </p>
*/
@Entity(name = "sound_data")
public class SoundData implements VulpesModel {
public class SoundDataEntity implements VulpesModel {

@Id
@GeneratedValue(strategy = GenerationType.UUID)
Expand All @@ -39,20 +36,20 @@ public class SoundData implements VulpesModel {
* This constructor is required for the JPA provider to instantiate the entity.
* </p>
*/
public SoundData() {
public SoundDataEntity() {
// No-argument constructor for JPA
}

/**
* Constructs a new {@link SoundData} with the specified values.
* Constructs a new {@link SoundDataEntity} with the specified values.
*
* @param id the unique identifier of the sound data
* @param name the name of the sound data
* @param source the source file or location of the sound
* @param volume the volume level of the sound
* @param pitch the pitch of the sound
*/
public SoundData(UUID id, String name, String source, double volume, double pitch) {
public SoundDataEntity(UUID id, String name, String source, double volume, double pitch) {
this.id = id;
this.name = name;
this.source = source;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
* </p>
*/
@Entity(name = "sounds")
public class SoundModel implements VulpesModel {
public class SoundEntity implements VulpesModel {

@Id
@GeneratedValue(strategy = GenerationType.UUID)
Expand All @@ -35,31 +35,31 @@ public class SoundModel implements VulpesModel {
* This is a one-to-many relationship where each sound model can have multiple sound data entities.
*/
@OneToMany(mappedBy = "id")
private List<SoundData> soundData;
private List<SoundDataEntity> soundDatumEntities;

/**
* Default constructor for JPA and Micronaut Data.
* <p>
* This constructor is required for the JPA provider to instantiate the entity.
* </p>
*/
public SoundModel() {
public SoundEntity() {
// No-argument constructor for JPA
}

/**
* Constructs a new {@link SoundModel} with the specified values.
* Constructs a new {@link SoundEntity} with the specified values.
*
* @param id the unique identifier of the sound model
* @param modelName the name of the sound model
* @param source the source file or location of the sound model
* @param soundData the list of sound data related to this sound model
* @param soundDatumEntities the list of sound data related to this sound model
*/
public SoundModel(UUID id, String modelName, String source, List<SoundData> soundData) {
public SoundEntity(UUID id, String modelName, String source, List<SoundDataEntity> soundDatumEntities) {
this.id = id;
this.modelName = modelName;
this.source = source;
this.soundData = soundData;
this.soundDatumEntities = soundDatumEntities;
}

// Getters and setters for each field
Expand Down Expand Up @@ -123,17 +123,17 @@ public void setSource(String source) {
*
* @return the list of sound data
*/
public List<SoundData> getSoundData() {
return soundData;
public List<SoundDataEntity> getSoundData() {
return soundDatumEntities;
}

/**
* Sets the list of sound data related to this sound model
*
* @param soundData the list of sound data to set
* @param soundDatumEntities the list of sound data to set
*/
public void setSoundData(List<SoundData> soundData) {
this.soundData = soundData;
public void setSoundData(List<SoundDataEntity> soundDatumEntities) {
this.soundDatumEntities = soundDatumEntities;
}

/**
Expand All @@ -147,7 +147,7 @@ public String toString() {
"id='" + id + '\'' +
", modelName='" + modelName + '\'' +
", source='" + source + '\'' +
", soundData=" + soundData +
", soundData=" + soundDatumEntities +
'}';
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

import io.micronaut.data.annotation.Repository;
import io.micronaut.data.repository.PageableRepository;
import net.theevilreaper.vulpes.api.model.AttributeModel;
import net.theevilreaper.vulpes.api.model.AttributeEntity;

import java.util.UUID;

@Repository
public interface AttributeRepository extends PageableRepository<AttributeModel, UUID> {
public interface AttributeRepository extends PageableRepository<AttributeEntity, UUID> {
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

import io.micronaut.data.annotation.Repository;
import io.micronaut.data.repository.PageableRepository;
import net.theevilreaper.vulpes.api.model.FontModel;
import net.theevilreaper.vulpes.api.model.FontEntity;

import java.util.UUID;

@Repository
public interface FontRepository extends PageableRepository<FontModel, UUID> {
public interface FontRepository extends PageableRepository<FontEntity, UUID> {
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

import io.micronaut.data.annotation.Repository;
import io.micronaut.data.repository.PageableRepository;
import net.theevilreaper.vulpes.api.model.ItemModel;
import net.theevilreaper.vulpes.api.model.ItemEntity;

import java.util.UUID;

@Repository
public interface ItemRepository extends PageableRepository<ItemModel, UUID> {
public interface ItemRepository extends PageableRepository<ItemEntity, UUID> {
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

import io.micronaut.data.annotation.Repository;
import io.micronaut.data.repository.PageableRepository;
import net.theevilreaper.vulpes.api.model.NotificationModel;
import net.theevilreaper.vulpes.api.model.NotificationEntity;

import java.util.UUID;

@Repository
public interface NotificationRepository extends PageableRepository<NotificationModel, UUID> {
public interface NotificationRepository extends PageableRepository<NotificationEntity, UUID> {
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

import io.micronaut.data.annotation.Repository;
import io.micronaut.data.repository.PageableRepository;
import net.theevilreaper.vulpes.api.model.sound.SoundModel;
import net.theevilreaper.vulpes.api.model.sound.SoundEntity;

import java.util.UUID;

@Repository
public interface SoundRepository extends PageableRepository<SoundModel, UUID> {
public interface SoundRepository extends PageableRepository<SoundEntity, UUID> {
}
Loading