CREATE TABLE orderbaskets (
    Id INT AUTO_INCREMENT PRIMARY KEY,
    OrderId INT NOT NULL,
    BasketNumber VARCHAR(100) NOT NULL,
    BasketId INT NOT NULL,
    ApplicationUserId VARCHAR(450) NOT NULL,
    IsScanned BOOLEAN NOT NULL DEFAULT 0,
    TotalMaterials DECIMAL(10, 2) NOT NULL,
    CreationDate DATETIME NOT NULL,
    Status VARCHAR(100) NOT NULL
);


CREATE TABLE intencionreventa (
    Id INT AUTO_INCREMENT PRIMARY KEY,
    LastName VARCHAR(250),
    FirstName VARCHAR(250),
    DocumentNumber TEXT,
    HomePhone TEXT,
    PhoneNumber TEXT,
    BirthDate DATETIME,
    Sex TEXT,
    Nationality TEXT,
    Email TEXT,
    EmailConfirmation TEXT,
    Status TEXT,
    CreationDate DATETIME,
    ResellerCode VARCHAR(10),
    WantToReceiveNewsletter TINYINT(1),
    ValidationCode INT,
    ApplicationUserId VARCHAR(450),
    ValidationAttempts INT,
    Address_Neighborhood TEXT,
    Address_Street TEXT,
    Address_PostalCode TEXT,
    Address_Complement TEXT,
    Address_Apartment TEXT,
    Address_Latitude FLOAT,
    Address_Locality TEXT,
    Address_Longitude FLOAT,
    Address_Number TEXT,
    Address_Floor TEXT,
    Address_Province TEXT,
    Address_Region TEXT,
    AuthorizePhonesDisclosure TINYINT(1),
    CUIL TEXT,
    DocumentType TEXT,
    UtmCampaign TEXT,
    UtmContent TEXT,
    UtmKeyword TEXT,
    UtmMedium TEXT,
    UtmSource TEXT
);


CREATE TABLE intencioncompra (
    Id INT AUTO_INCREMENT PRIMARY KEY,
    LastName VARCHAR(250),
    FirstName VARCHAR(250),
    Email TEXT,
    EmailConfirmation TEXT,
    PhoneNumber TEXT,
    HomePhone TEXT,
    Nationality TEXT,
    Address_Region TEXT,
    Address_Locality TEXT,
    Address_Province TEXT,
    Address_PostalCode TEXT,
    Address_Neighborhood TEXT,
    Address_Street TEXT,
    Address_Number TEXT,
    Address_Floor TEXT,
    Address_Apartment TEXT,
    Address_Complement TEXT,
    Address_Latitude FLOAT,
    Address_Longitude FLOAT,
    UtmSource TEXT,
    UtmCampaign TEXT,
    UtmContent TEXT,
    UtmMedium TEXT,
    UtmKeyword TEXT,
    Status TEXT,
    CreationDate DATETIME,
    ValidationCode INT,
    AuthorizePhonesDisclosure TINYINT(1),
    WantToReceiveNewsletter TINYINT(1),
    DocumentType TEXT,
    DocumentNumber TEXT,
    GeoLocatedZoneId INT,
    Observations TEXT
);


