Speichere individuelle Haar- und Augenfarben je Charakter
All checks were successful
Deploy to production / deploy (push) Successful in 2m24s

This commit is contained in:
Torsten Schulz (local)
2026-11-04 16:54:33 +01:00
parent dd409a6a6a
commit bc7a0cb67a
10 changed files with 250 additions and 15 deletions

View File

@@ -23,6 +23,17 @@ FalukantCharacter.init(
defaultValue: DataTypes.NOW},
gender: {
type: DataTypes.STRING},
// The DB trigger initializes these for Sequelize and raw daemon inserts.
hairColor: {
type: DataTypes.STRING(7),
allowNull: true,
validate: { is: /^#[0-9a-fA-F]{6}$/ },
},
eyeColor: {
type: DataTypes.STRING(7),
allowNull: true,
validate: { is: /^#[0-9a-fA-F]{6}$/ },
},
// Initialized once by the DB trigger, also for raw daemon INSERTs.
// Nullable here so Sequelize lets omitted values reach that trigger;
// the database enforces NOT NULL and the ordering of both ages.