CREATE TABLE IF NOT EXISTS `coin_settings` (
  `id` INT AUTO_INCREMENT PRIMARY KEY,
  `setting_name` VARCHAR(100) NOT NULL UNIQUE,
  `setting_value` VARCHAR(255),
  `description` TEXT,
  `created_at` TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
  `updated_at` TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
);

INSERT INTO `coin_settings` (`setting_name`, `setting_value`, `description`) VALUES
('coins_per_month', '100', 'Coins required per month of service extension'),
('coins_per_account', '200', 'Coins required to create a new account'),
('coins_per_cash_unit', '100', 'Coins required per cash currency unit for withdrawal'),
('min_cash_withdrawal', '10', 'Minimum cash amount for withdrawal'),
('cash_currency', 'PHP', 'Currency for cash withdrawals')
ON DUPLICATE KEY UPDATE `setting_value` = VALUES(`setting_value`);
