--
-- 06-12-2024 FTH
--
INSERT INTO `champs_de_base` (`id`, `libelle`, `type`, `equivalentSql`, `tableSql`, `sourceListe`, `idTypeSql`, `idTypeHtml`, `critere`) VALUES (NULL, 'Campagne', 'int(11)', 'idCampagne', 'reservations', 'campagnes', '1', '3', NULL);

--
-- 10-12-2024 FTH
--
ALTER TABLE `champs_catalogue` ADD `modifierListe` TINYINT(1) NULL DEFAULT '0' ;


--
-- 20-12-2024 AAK
--
ALTER TABLE `modes_campagne` ADD `forcerCreationLocataireSiAbsentCampagne` TINYINT(1) UNSIGNED NOT NULL DEFAULT '0' AFTER `nePasEmettreFacturePourPrestationApiPms`;


--
-- 31-12-2024 FTH : API paiements : Monetico V2, globalpay
--

-- Monetico V2 :

-- INSERT INTO `api_paiement` (`id`, `nom`, `className`, `active`) VALUES (8, 'Monetico V2', 'MoneticoV2', '0');
-- INSERT INTO `api_setting` (`id`, `nom`, `cle`, `valeur`, `idAPI`) VALUES
-- (null, 'URLSERVER', 'URLSERVER', 'https://p.monetico-services.com/paiement.cgi', 8),
-- (null, 'TPE', 'TPE', '', 8),
-- (null, 'Clé de sécurité', 'KEY', '', 8),
-- (null, 'Version', 'version', '3.0', 8),
-- (null, 'Société', 'societe', 'WHEB', 8),
-- (null, 'URL paiement OK', 'url_retour_ok', '', 8),
-- (null, 'URL paiement KO', 'url_retour_err', '', 8);
-- (null, '3D-secure', '3dsdebrayable', '1', 8);
-- (null, 'ThreeDSecureChallenge', 'ThreeDSecureChallenge', 'challenge_preferred', 8);

-- Gobalpay :

-- INSERT INTO `api_paiement` (`id`, `nom`, `className`, `active`) VALUES (9, 'Globalpay', 'Globalpay', '0');
-- INSERT INTO `api_setting` (`id`, `nom`, `cle`, `valeur`, `idAPI`) VALUES
-- (null, 'URLSERVER', 'URLSERVER', 'https://pay.realexpayments.com/pay', 9),
-- (null, 'MERCHANT_ID', 'MERCHANT_ID', '', 9),
-- (null, 'ACCOUNT', 'ACCOUNT', '', 9),
-- (null, 'Clé de sécurité', 'KEY', '', 9),
-- (null, 'Version', 'version', '2', 9),
-- (null, 'URL reponse', 'url_retour', '', 9);

-- Flywire :
-- INSERT INTO `api_paiement` (`id`, `nom`, `className`, `active`) VALUES (10, 'Flywire', 'Flywire', '0');
-- INSERT INTO `api_setting` (`id`, `nom`, `cle`, `valeur`, `idAPI`) VALUES
-- (null, 'URLSERVER', 'URLSERVER', 'https://api-platform.flywire.com/payments/v1/', 10),
-- (null, 'lien locale checkout', 'URLCHECKOUT', '', 10),
-- (null, 'Recipient', 'Recipient', '', 10),
-- (null, 'Notifications url/retour', 'url_retour', '', 10),
-- (null, 'KEY', 'KEY', '', 10),
-- (null, 'URL paiement OK', 'url_retour_ok', '', 10),
-- (null, 'URL paiement KO', 'url_retour_err', '', 10);

--
-- 06-01-2025 FTH
--
INSERT INTO `droit_elements` (`id`, `nom`, `unique_name`, `type`, `parent_id`) VALUES (NULL, 'Mode logement : ajout logement', 'liste-btn-ajouter-logement', 'bouton', '1');

--
-- 08-01-2025 FTH
--
ALTER TABLE `historique_menage` ADD `typeChangement` VARCHAR(30) NULL ;

--
-- 10-01-2025 FTH : on supprime le sous menu Général Push
--
DELETE FROM `droit_elements` WHERE `unique_name` = 'zfcadmin/push' AND `parent_id`=4;

--
-- 16-01-2025 FTH
--
ALTER TABLE `tarifs` ADD `codeOrganisme` VARCHAR(5) NULL ;
ALTER TABLE `comptes` ADD `codeOrganisme` VARCHAR(5) NULL ;

--
-- 21-01-2025 FTH
--
INSERT INTO `champs` (`id`, `code`, `nom`, `idTheme`, `ordre`, `taille`, `equivalentSql`, `sourceListe`, `idTypeHtml`, `afficher`, `table`) VALUES (NULL, 'codeSite', 'Code Site PMS', '2', '30', '100', 'codeSite', '', '1', '0', 'reservations');

--
-- 28-01-2025 FTH
--
ALTER TABLE `modes_campagne` ADD `chgLogSansMajDatesABD` TINYINT(1) NOT NULL DEFAULT '0' COMMENT 'Changement logement meme site sans modification de dates ABD' ;
