
CREATE TABLE users (
  id INT AUTO_INCREMENT PRIMARY KEY,
  telegram_id BIGINT UNIQUE,
  username VARCHAR(100),
  status ENUM('active','block') DEFAULT 'active',
  created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);

CREATE TABLE uids (
  id INT AUTO_INCREMENT PRIMARY KEY,
  uid VARCHAR(50),
  telegram_id BIGINT,
  status ENUM('LIVE','DIE','CHECKING') DEFAULT 'CHECKING',
  created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);

CREATE TABLE uid_logs (
  id INT AUTO_INCREMENT PRIMARY KEY,
  uid VARCHAR(50),
  old_status VARCHAR(10),
  new_status VARCHAR(10),
  created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);
