-- phpMyAdmin SQL Dump
-- version 2.8.0.2
-- http://www.phpmyadmin.net
-- 
-- Máquina: localhost
-- Data de Criação: 10-Mai-2007 às 11:39
-- Versão do servidor: 4.1.11
-- versão do PHP: 5.0.5
-- 
-- Base de Dados: `imobiliaria`
-- 

-- --------------------------------------------------------

-- 
-- Estrutura da tabela `apartmentHousingFarm`
-- 

CREATE TABLE `apartmentHousingFarm` (
  `typology` varchar(50) NOT NULL default '',
  `state` varchar(50) NOT NULL default '',
  `hall` int(11) default '0',
  `bedRoom` int(11) default '0',
  `laundryRoom` int(11) default '0',
  `marquee` int(11) default '0',
  `suite` int(11) default '0',
  `livingRoom` int(11) default '0',
  `verandah` int(11) default '0',
  `pantry` int(11) default '0',
  `kitchenet` int(11) default '0',
  `dinnerRoom` int(11) default '0',
  `kitchen` int(11) default '0',
  `barbecue` int(11) default '0',
  `internetLinking` int(11) default '0',
  `boiler` int(11) default '0',
  `alarm` int(11) default '0',
  `airConditioned` int(11) default '0',
  `centralAspiration` int(11) default '0',
  `hidromassagemBathtub` int(11) default '0',
  `mirroredGlass` int(11) default '0',
  `doubleGlasses` int(11) default '0',
  `videoDoorman` int(11) default '0',
  `phone` int(11) default '0',
  `heatedTowelRacks` int(11) default '0',
  `securityService` int(11) default '0',
  `poliban` int(11) default '0',
  `closet` int(11) default '0',
  `armoredDoor` int(11) default '0',
  `highDoorSecurity` int(11) default '0',
  `dishWasher` int(11) default '0',
  `dryer` int(11) default '0',
  `jacuzzi` int(11) default '0',
  `microWaves` int(11) default '0',
  `exhaustFan` int(11) default '0',
  `fireplace` int(11) default '0',
  `waterHeater` int(11) default '0',
  `electricBlinds` int(11) default '0',
  `detectorIntrusion` int(11) default '0',
  `detectorFires` int(11) default '0',
  `stove` int(11) default '0',
  `detectorFlooding` int(11) default '0',
  `oven` int(11) default '0',
  `refrigerator` int(11) default '0',
  `jugGas` int(11) default '0',
  `naturalGas` int(11) default '0',
  `elevator` int(11) default '0',
  `thermalIsolation` int(11) default '0',
  `terrace` int(11) default '0',
  `accessDeficient` int(11) default '0',
  `annex` int(11) default '0',
  `garage` int(11) default '0',
  `removableWalls` int(11) default '0',
  `acousticIsolation` int(11) default '0',
  `pool` int(11) default '0',
  `coveredTerrace` int(11) default '0',
  `land` float default '0',
  `yearConstruction` int(11) default '0',
  `clothesWather` int(11) default '0',
  `typeHousing` varchar(255) default NULL,
  `propertyId` int(11) NOT NULL auto_increment,
  PRIMARY KEY  (`propertyId`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

-- 
-- Extraindo dados da tabela `apartmentHousingFarm`
-- 


-- --------------------------------------------------------

-- 
-- Estrutura da tabela `building`
-- 

CREATE TABLE `building` (
  `apartmentNumber` int(11) default NULL,
  `commerce` int(11) default NULL,
  `construtionYear` int(11) default '0',
  `state` varchar(255) default NULL,
  `propertyId` int(11) NOT NULL auto_increment,
  PRIMARY KEY  (`propertyId`),
  KEY `FKbuilding145637` (`propertyId`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

-- 
-- Extraindo dados da tabela `building`
-- 


-- --------------------------------------------------------

-- 
-- Estrutura da tabela `favorite`
-- 

CREATE TABLE `favorite` (
  `userId` int(11) NOT NULL default '0',
  `propertyId` int(11) NOT NULL default '0',
  PRIMARY KEY  (`userId`,`propertyId`),
  KEY `FKfavorite362274` (`userId`),
  KEY `FKfavorite387080` (`propertyId`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

-- 
-- Extraindo dados da tabela `favorite`
-- 


-- --------------------------------------------------------

-- 
-- Estrutura da tabela `images`
-- 

CREATE TABLE `images` (
  `id` int(11) NOT NULL auto_increment,
  `image` blob,
  `name` varchar(255) default NULL,
  `type` varchar(255) default NULL,
  `size` int(11) default NULL,
  `propertyId` int(11) default NULL,
  PRIMARY KEY  (`id`),
  KEY `FKimages541278` (`propertyId`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

-- 
-- Extraindo dados da tabela `images`
-- 


-- --------------------------------------------------------

-- 
-- Estrutura da tabela `land`
-- 

CREATE TABLE `land` (
  `constructionArea` int(11) default '0',
  `publicPark` int(11) default NULL,
  `wall` int(11) default NULL,
  `Vedacao` int(11) default NULL,
  `warehouse` int(11) default NULL,
  `typeLand` varchar(255) default NULL,
  `propertyId` int(11) NOT NULL auto_increment,
  PRIMARY KEY  (`propertyId`),
  KEY `FKland864272` (`propertyId`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

-- 
-- Extraindo dados da tabela `land`
-- 


-- --------------------------------------------------------

-- 
-- Estrutura da tabela `property`
-- 

CREATE TABLE `property` (
  `id` int(11) NOT NULL default '0',
  `description` varchar(255) default NULL,
  `date` date default NULL,
  `totalArea` float default '0',
  `transactionType` varchar(50) NOT NULL default '',
  `price` float NOT NULL default '0',
  `geenZones` int(11) default '0',
  `courtTenis` int(11) default '0',
  `golf` int(11) default '0',
  `firemen` int(11) default '0',
  `library` int(11) default '0',
  `autoRoad` int(11) default '0',
  `cityCenter` int(11) default '0',
  `commercialZone` int(11) default '0',
  `sightRiver` int(11) default '0',
  `sightField` int(11) default '0',
  `sightBeach` int(11) default '0',
  `sightLak` int(11) default '0',
  `riverPort` int(11) default '0',
  `seaPort` int(11) default '0',
  `areaInfantileLeisure` int(11) default '0',
  `beach` int(11) default '0',
  `publicTransports` int(11) default '0',
  `police` int(11) default '0',
  `hospital` int(11) default '0',
  `hypermarket` int(11) default '0',
  `airport` int(11) default '0',
  `pharmacy` int(11) default '0',
  `gymnasium` int(11) default '0',
  `school` int(11) default '0',
  `CompanyId` int(11) NOT NULL default '0',
  `typeProperty` varchar(50) NOT NULL default '',
  `council` varchar(255) default NULL,
  `freguesia` varchar(255) default NULL,
  `zip` varchar(255) default NULL,
  `orderBy` int(11) default '0',
  `parking` int(11) default NULL,
  `contactId` int(11) default NULL,
  `reference` varchar(255) NOT NULL default '',
  `userId` int(11) default NULL,
  PRIMARY KEY  (`id`),
  UNIQUE KEY `reference` (`reference`),
  KEY `FKproperty496361` (`CompanyId`),
  KEY `FKproperty742489` (`contactId`),
  KEY `FKproperty571360` (`userId`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

-- 
-- Extraindo dados da tabela `property`
-- 


-- --------------------------------------------------------

-- 
-- Estrutura da tabela `warehouseStoreOffice`
-- 

CREATE TABLE `warehouseStoreOffice` (
  `alarm` int(11) default NULL,
  `airConditioned` int(11) default NULL,
  `bathHouse` int(11) default '0',
  `numberDivisions` int(11) default '0',
  `constructionYear` int(11) default NULL,
  `propertyId` int(11) NOT NULL auto_increment,
  PRIMARY KEY  (`propertyId`),
  KEY `FKwarehouseS458386` (`propertyId`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

-- 
-- Extraindo dados da tabela `warehouseStoreOffice`
-- 

