
-- SATIŞÇILAR
CREATE TABLE IF NOT EXISTS `satiscilar` (
  `id` INT AUTO_INCREMENT PRIMARY KEY,
  `user_id` INT NOT NULL,
  `ad_soyad` VARCHAR(150) NOT NULL,
  `phone` VARCHAR(50),
  `created_at` TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);

-- RESTORANLAR
CREATE TABLE IF NOT EXISTS `restoranlar` (
  `id` INT AUTO_INCREMENT PRIMARY KEY,
  `satisci_id` INT NOT NULL,
  `name` VARCHAR(200) NOT NULL,
  `contact_name` VARCHAR(150),
  `email` VARCHAR(150),
  `phone` VARCHAR(50),
  `address` TEXT,
  `trial_start` DATE,
  `trial_end` DATE,
  `paket` VARCHAR(20) DEFAULT 'trial',
  `fiyat` DECIMAL(10,2) DEFAULT 0,
  `created_at` TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);

-- ÖDEMELER
CREATE TABLE IF NOT EXISTS `odemeler` (
  `id` INT AUTO_INCREMENT PRIMARY KEY,
  `restoran_id` INT NOT NULL,
  `tutar` DECIMAL(10,2) NOT NULL,
  `durum` VARCHAR(20) DEFAULT 'beklemede',
  `created_at` TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);

