fix: rendre un animal adopté indisponible
This commit is contained in:
parent
d35434c522
commit
b8abaa8440
7 changed files with 42 additions and 9 deletions
|
|
@ -99,6 +99,9 @@ class AdoptionService
|
|||
UPDATE animals
|
||||
SET
|
||||
status = 'adopte',
|
||||
adoption_availability = 'not_available',
|
||||
adoption_available_from = NULL,
|
||||
adoption_unavailability_reason = 'Animal adopté',
|
||||
refuge_room = NULL,
|
||||
care_box_key = NULL,
|
||||
updated_at = CURRENT_TIMESTAMP,
|
||||
|
|
@ -162,6 +165,7 @@ class AdoptionService
|
|||
$stmt = $db->prepare("
|
||||
INSERT INTO animal_history (
|
||||
animal_id,
|
||||
action,
|
||||
type,
|
||||
label,
|
||||
details,
|
||||
|
|
@ -170,6 +174,7 @@ class AdoptionService
|
|||
) VALUES (
|
||||
:animal_id,
|
||||
'adoption',
|
||||
'adoption',
|
||||
'Adoption finalisée',
|
||||
:details,
|
||||
:user_id,
|
||||
|
|
|
|||
Loading…
Reference in a new issue