feat(api): add hp_regen_since column for persistent HP regeneration

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
Bastian Wagner
2026-08-21 14:26:44 +02:00
parent b55518b451
commit 19e08f0b16
3 changed files with 48 additions and 0 deletions

View File

@@ -35,6 +35,12 @@ export class Character {
@Column({ name: 'current_hp', type: 'integer' })
currentHp!: number;
// `current_hp` is only exact while this is null (regeneration paused, e.g.
// mid-combat). Otherwise it's the HP as of this timestamp -- read it
// through CharacterVitalsService.effectiveHp(), never directly.
@Column({ name: 'hp_regen_since', type: 'timestamptz', nullable: true })
hpRegenSince!: Date | null;
@Column({ name: 'current_location_id', type: 'uuid' })
currentLocationId!: string;