-- Add paid_month column to contributions for monthly tracking
CALL AddColumnIfNotExists('contributions', 'paid_month', 'VARCHAR(7) DEFAULT NULL AFTER `payment_date`');
CALL AddColumnIfNotExists('contributions', 'updated_by', 'INT DEFAULT NULL AFTER `processed_by`');

-- Payment reminder settings
INSERT IGNORE INTO `settings` (`key`, `value`, `type`, `group`) VALUES
('payment_reminder_enabled', 'true', 'boolean', 'payment'),
('payment_reminder_day', '1', 'number', 'payment'),
('payment_reminder_frequency', 'weekly', 'text', 'payment'),
('payment_reminder_grace_days', '5', 'number', 'payment'),
('payment_reminder_subject', 'Payment Reminder - Membership Contribution', 'text', 'payment'),
('payment_reminder_message', 'Dear {name},\n\nThis is a friendly reminder that your membership contribution for {month} has not been recorded yet.\n\nPlease make your payment at your earliest convenience to avoid any disruption in your membership benefits.\n\nThank you for your continued support.\n\nGhana Anaesthesiologists Society', 'textarea', 'payment'),
('receipt_prefix', 'GAS/RECEIPT', 'text', 'payment'),
('receipt_company_name', 'Ghana Anaesthesiologists Society', 'text', 'payment'),
('receipt_company_details', 'P.O. Box XX, Accra, Ghana | Email: info@ghanaanaesthesia.com | Tel: +233-XXX-XXXX', 'text', 'payment');
