Make MARC roles an enum and restructure how contributors are fetched from the DB to reduce queries

This commit is contained in:
Alex Cabal 2024-11-11 12:01:53 -06:00
parent daf8e16ef4
commit d6a2bdcbc8
8 changed files with 91 additions and 75 deletions

9
lib/Enums/MarcRole.php Normal file
View file

@ -0,0 +1,9 @@
<?
namespace Enums;
enum MarcRole: string{
case Author = 'aut';
case Contributor = 'ctb';
case Illustrator = 'ill';
case Translator = 'trl';
}