chore: add CLAUDE.md with coding standards and build commands
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
package com.onixbyte.deltaforceguide.domain.entity;
|
||||
|
||||
import com.onixbyte.deltaforceguide.enumeration.FirearmType;
|
||||
import jakarta.persistence.AttributeConverter;
|
||||
import jakarta.persistence.Converter;
|
||||
|
||||
@Converter(autoApply = false)
|
||||
public class FirearmTypeConverter implements AttributeConverter<FirearmType, Integer> {
|
||||
|
||||
@Override
|
||||
public Integer convertToDatabaseColumn(FirearmType attribute) {
|
||||
return attribute == null ? null : attribute.getCode();
|
||||
}
|
||||
|
||||
@Override
|
||||
public FirearmType convertToEntityAttribute(Integer dbData) {
|
||||
return FirearmType.fromCode(dbData);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user