-- --------------------------------------------------------
-- Server OS:                    Win64
-- HeidiSQL Version:             12.10.0.7000
-- --------------------------------------------------------


-- Dumping structure for table carpsilviuionut.tds_subscriptions
CREATE TABLE IF NOT EXISTS `tds_subscriptions` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `plan_id` int(11) NOT NULL,
  `user_id` int(11) NOT NULL,
  `ref_id` int(11) DEFAULT NULL,
  `billing_first_name` varchar(50) DEFAULT NULL,
  `billing_last_name` varchar(60) DEFAULT NULL,
  `billing_company_name` varchar(100) DEFAULT NULL,
  `billing_cui` varchar(50) DEFAULT NULL,
  `billing_j` varchar(50) DEFAULT NULL,
  `billing_address` varchar(500) DEFAULT NULL,
  `billing_county` varchar(50) DEFAULT NULL,
  `billing_city` varchar(50) DEFAULT NULL,
  `billing_country` varchar(50) DEFAULT NULL,
  `billing_phone` varchar(50) DEFAULT NULL,
  `billing_email` varchar(50) DEFAULT NULL,
  `billing_bank_account` varchar(50) DEFAULT NULL,
  `billing_post_code` varchar(50) DEFAULT NULL,
  `billing_vat_number` varchar(50) DEFAULT NULL,
  `price` varchar(50) NOT NULL,
  `next_price` varchar(50) DEFAULT '',
  `curr_name` varchar(50) DEFAULT '',
  `curr_pos` varchar(30) DEFAULT '',
  `curr_th_sep` varchar(30) DEFAULT '',
  `curr_dec_sep` varchar(30) DEFAULT '',
  `curr_dec_no` varchar(30) DEFAULT '',
  `payment_type` varchar(50) DEFAULT NULL,
  `payment_details` text DEFAULT NULL,
  `status` varchar(50) NOT NULL,
  `is_free` tinyint(1) DEFAULT 0,
  `is_unlimited` tinyint(1) DEFAULT 0,
  `cycle_interval` varchar(50) NOT NULL DEFAULT '',
  `cycle_interval_count` int(11) NOT NULL DEFAULT 1,
  `trial_days` varchar(50) DEFAULT '0',
  `start_date` timestamp NOT NULL DEFAULT current_timestamp(),
  `stripe_payment_intent` varchar(255) DEFAULT NULL,
  `stripe_payment_method` text DEFAULT NULL,
  `stripe_payment_status` varchar(255) DEFAULT NULL,
  `stripe_payment_info` text DEFAULT NULL,
  `stripe_customer_id` varchar(40) DEFAULT '',
  `stripe_subscription_id` varchar(40) DEFAULT '',
  `stripe_invoice_details` text DEFAULT NULL,
  `confirm_key` varchar(40) DEFAULT '',
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `canceled` tinyint(4) NOT NULL DEFAULT 0,
  `coupon_id` int(11) NOT NULL DEFAULT 0,
  `plan_posts_remaining` longtext DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_520_ci;

-- Dumping data for table carpsilviuionut.tds_subscriptions: ~0 rows (approximately)
DELETE FROM `tds_subscriptions`;

