-- Backup of table `competitions` from database `competition_system`
-- Date: 2024-11-07 01:40:32

CREATE TABLE `competitions` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `competition_name` varchar(255) NOT NULL,
  `is_available` tinyint(1) NOT NULL DEFAULT 1,
  `balance` decimal(15,2) NOT NULL DEFAULT 0.00,
  `gift` varchar(255) NOT NULL,
  `submission_end_date` datetime DEFAULT NULL,
  `competition_end_date` datetime DEFAULT NULL,
  `processed` tinyint(1) NOT NULL DEFAULT 0 COMMENT 'هل تم معالجة المسابقة المنتهية؟',
  `has_stop` tinyint(1) NOT NULL DEFAULT 0 COMMENT 'هل يوجد ستوب؟',
  `stop_amount` decimal(10,2) DEFAULT NULL COMMENT 'مقدار الستور أو الخسارة ($)',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `account_type` enum('demo','live') NOT NULL DEFAULT 'demo',
  `trading_group` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

INSERT INTO `competitions` (`id`, `competition_name`, `is_available`, `balance`, `gift`, `submission_end_date`, `competition_end_date`, `processed`, `has_stop`, `stop_amount`, `created_at`, `updated_at`, `account_type`, `trading_group`) VALUES (3, 'افضل متداول لشهر 10', 0, 500.00, '200', 2024-10-20 23:59:00, 2024-10-31 23:59:00, 1, 1, 349.99, 2024-10-17 12:11:52, 2024-11-01 00:01:30, 'demo', 'demo\Prize');

