text: CREATE TABLE "customers" (
    "id" SERIAL PRIMARY KEY,
    "name" text NOT NULL,
    "CPF" int UNIQUE,
    "categoryCNH" text,
    "gender" text,
    "email" text,
    "orders_numbers" int
  );
  
  CREATE TABLE "agencies" (
    "id" SERIAL PRIMARY KEY,
    "name" text NOT NULL,
    "CNPJ" int UNIQUE,
    "email" text,
    "phone" int,
    "status" int DEFAULT 1,
    "addresses_id" int UNIQUE
  );
  
  CREATE TABLE "addresses" (
    "id" SERIAL PRIMARY KEY,
    "CEP" int,
    "street" varchar,
    "city" text,
    "UF" text,
    "country" text
  );
  
  CREATE TABLE "cars" (
    "id" SERIAL PRIMARY KEY,
    "licence_plate" char UNIQUE,
    "rental_value" int NOT NULL,
    "color" text,
    "yearCar" int,
    "numberDoors" int,
    "status" int DEFAULT 1
  );
  
  CREATE TABLE "models" (
    "id" SERIAL PRIMARY KEY,
    "brand" text NOT NULL,
    "model" varchar,
    "autoTransmission" int DEFAULT 0,
    "fuel" int NOT NULL,
    "observation" text,
    "car_id" int
  );
  
  CREATE TABLE "orders" (
    "id" SERIAL PRIMARY KEY,
    "customers_id" int NOT NULL,
    "agency_id" int NOT NULL,
    "lease_date" timestamp,
    "return_date" timestamp,
    "total_days" int,
    "price_rental" int NOT NULL
  );
  
  CREATE TABLE "ordersCars" (
    "id" SERIAL PRIMARY KEY,
    "car_id" int,
    "order_id" int
  );
  
  ALTER TABLE "addresses" ADD FOREIGN KEY ("id") REFERENCES "agencies" ("addresses_id");
  
  ALTER TABLE "cars" ADD FOREIGN KEY ("id") REFERENCES "models" ("car_id");
  
  ALTER TABLE "orders" ADD FOREIGN KEY ("customers_id") REFERENCES "customers" ("id");
  
  ALTER TABLE "orders" ADD FOREIGN KEY ("agency_id") REFERENCES "agencies" ("id");
  
  ALTER TABLE "ordersCars" ADD FOREIGN KEY ("car_id") REFERENCES "cars" ("id");
  
  ALTER TABLE "ordersCars" ADD FOREIGN KEY ("order_id") REFERENCES "orders" ("id");
  