CREATE SCHEMA nexus;
CREATE SCHEMA nexus_it;
CREATE SCHEMA techwave;
CREATE SCHEMA nexus_food;
CREATE SCHEMA guardforce;
CREATE TYPE nexus.position AS ENUM (
    'JUNIOR',
    'SENIOR',
    'MANAGER',
    'DIRECTOR'
);
CREATE TYPE nexus.relationship_type AS ENUM (
    'PARENT',
    'SUBSIDIARY',
    'AFFILIATE'
);
CREATE TYPE nexus_food.nutriscore AS ENUM (
    'A',
    'B',
    'C',
    'D',
    'E'
);
CREATE TABLE nexus.employees
(
    id SERIAL PRIMARY KEY,
    first_name VARCHAR(25),
    last_name VARCHAR(25),
    employee_position nexus.position,
    salary NUMERIC(10, 2)
);
CREATE TABLE nexus.nexus_relations
(
    id SERIAL PRIMARY KEY,
    parent_company VARCHAR(25),
    child_company VARCHAR(25),
    relationship_type nexus.relationship_type
);
CREATE TABLE nexus_it.software_assets
(
    id SERIAL PRIMARY KEY,
    software_name VARCHAR(50),
    license_key UUID,
    expiration_date DATE
);
CREATE TABLE techwave.project_milestones
(
    id SERIAL PRIMARY KEY,
    milestone_name VARCHAR(50),
    due_date DATE,
    completion_status BOOLEAN
);
CREATE TABLE nexus_food.products
(
    id SERIAL PRIMARY KEY,
    product_name VARCHAR(25),
    product_nutriscore nexus_food.nutriscore
);
CREATE TABLE guardforce.incident_reports
(
    id SERIAL PRIMARY KEY,
    incident_description TEXT,
    incident_date TIMESTAMP,
    incident_location VARCHAR(50),
    reported_by VARCHAR(50)
);
