CREATE SCHEMA Mundus;
USE Mundus;

CREATE TABLE GameEventLogs (
	id INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
    message VARCHAR(100) NOT NULL
);

CREATE TABLE Recipes (
	id INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
	resultitem VARCHAR(45) NOT NULL,
    count1 INT NOT NULL,
    reqitem1 VARCHAR(45) NOT NULL,
    count2 INT,
    reqitem2 VARCHAR(45),
    count3 INT,
    reqitem3 VARCHAR(45),
    count4 INT,
    reqitem4 VARCHAR(45),
    count5 INT,
    reqitem5 VARCHAR(45)
);

-- Sky SuperLayer tables
CREATE TABLE SMobLayer(
	id INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
    XPos INT NOT NULL UNIQUE,
    YPos INT NOT NULL UNIQUE,
    stock_id VARCHAR(45)
);

CREATE TABLE SStructureLayer(
	id INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
    XPos INT NOT NULL UNIQUE,
    YPos INT NOT NULL UNIQUE,
    stock_id VARCHAR(45)
);

CREATE TABLE SGroundLayer(
	id INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
    XPos INT NOT NULL UNIQUE,
    YPos INT NOT NULL UNIQUE,
    stock_id VARCHAR(45)
);

-- Land SuperLayer tables
CREATE TABLE LMobLayer(
	id INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
    XPos INT NOT NULL UNIQUE,
    YPos INT NOT NULL UNIQUE,
    stock_id VARCHAR(45)
);

CREATE TABLE LStructureLayer(
	id INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
    XPos INT NOT NULL UNIQUE,
    YPos INT NOT NULL UNIQUE,
    stock_id VARCHAR(45)
);

CREATE TABLE LGroundLayer(
	id INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
    XPos INT NOT NULL UNIQUE,
    YPos INT NOT NULL UNIQUE,
    stock_id VARCHAR(45)
);

-- Underground SuperLayer tables
CREATE TABLE UMobLayer(
	id INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
    XPos INT NOT NULL UNIQUE,
    YPos INT NOT NULL UNIQUE,
    stock_id VARCHAR(45)
);

CREATE TABLE UStructureLayer(
	id INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
    XPos INT NOT NULL UNIQUE,
    YPos INT NOT NULL UNIQUE,
    stock_id VARCHAR(45)
);

CREATE TABLE UGroundLayer(
	id INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
    XPos INT NOT NULL UNIQUE,
    YPos INT NOT NULL UNIQUE,
    stock_id VARCHAR(45)
);