
CREATE DATABASE IF NOT EXISTS spbu
  CHARACTER SET utf8mb4
  COLLATE utf8mb4_unicode_ci;

USE spbu;

CREATE TABLE IF NOT EXISTS spbu (
  id          INT(11)       NOT NULL AUTO_INCREMENT,
  nama_spbu   VARCHAR(255)  NOT NULL,
  nomor_wa    VARCHAR(20)   NOT NULL,
  buka_24_jam TINYINT(1)    NOT NULL DEFAULT 0,
  latitude    DECIMAL(10,7) NOT NULL,
  longitude   DECIMAL(10,7) NOT NULL,
  PRIMARY KEY (id)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- Data contoh
INSERT INTO spbu (nama_spbu, nomor_wa, buka_24_jam, latitude, longitude) VALUES
  ('SPBU Pertamina Sungai Raya', '6281234567890', 1, -0.0553800, 109.3494700),
  ('SPBU Pertamina Ahmad Yani',  '6289876543210', 0, -0.0621000, 109.3420000);
