CREATE TABLE transactions ( id INT(11) UNSIGNED AUTO_INCREMENT PRIMARY KEY, date DATETIME NOT NULL, type ENUM('entrée', 'sortie') NOT NULL, numero_appart VARCHAR(255) NOT NULL, service VARCHAR(255), moyen_paiement ENUM('cash', 'chèque', 'application') NOT NULL, montant DECIMAL(10,2) NOT NULL, FOREIGN KEY (numero_appart) REFERENCES appartements(numero_appart) );