
CREATE TABLE users(
id INT AUTO_INCREMENT PRIMARY KEY,
username VARCHAR(50),
email VARCHAR(100),
password VARCHAR(255),
credits INT DEFAULT 0
);

CREATE TABLE sites(
id INT AUTO_INCREMENT PRIMARY KEY,
user_id INT,
url TEXT,
approved TINYINT DEFAULT 0
);

CREATE TABLE banners(
id INT AUTO_INCREMENT PRIMARY KEY,
user_id INT,
image TEXT,
url TEXT,
views INT DEFAULT 0
);

CREATE TABLE referrals(
id INT AUTO_INCREMENT PRIMARY KEY,
referrer INT,
referred INT
);

CREATE TABLE contest_views(
id INT AUTO_INCREMENT PRIMARY KEY,
user_id INT,
views INT DEFAULT 0
);

CREATE TABLE stats(
id INT AUTO_INCREMENT PRIMARY KEY,
user_id INT,
views INT DEFAULT 0
);
