-- http://www.phpmyadmin.net
--




--
-- Database: `avaria`
--

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

--
-- Table structure for table `avarias`
--

CREATE TABLE IF NOT EXISTS `avarias` (
  `codavaria` int(4) NOT NULL AUTO_INCREMENT,
  `codutilizador` int(3) NOT NULL,
  `prioridade` varchar(20) NOT NULL,
  `bandeira` varchar(20) NOT NULL,
  `codsala` int(6) NOT NULL,
  `npc` varchar(4) NOT NULL,
  `codhard` int(3) NOT NULL,
  `outrohard` varchar(20) NOT NULL,
  `codsoft` int(3) NOT NULL,
  `outrosoft` varchar(50) NOT NULL,
  `data` varchar(10) NOT NULL,
  `hora` varchar(5) NOT NULL,
  `descricao` text NOT NULL,
  `relatorio` text NOT NULL,
  `estado` int(3) NOT NULL,
  `estado2` varchar(20) NOT NULL,
  PRIMARY KEY (`codavaria`),
  KEY `codutilizador` (`codutilizador`),
  KEY `codutilizador_2` (`codutilizador`),
  KEY `codsala` (`codsala`),
  KEY `codsala_2` (`codsala`),
  KEY `codhard` (`codhard`),
  KEY `codsoft` (`codsoft`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

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

--
-- Table structure for table `hardware`
--

CREATE TABLE IF NOT EXISTS `hardware` (
  `codhard` int(3) NOT NULL AUTO_INCREMENT,
  `nomehard` varchar(50) NOT NULL,
  PRIMARY KEY (`codhard`),
  UNIQUE KEY `codhard` (`codhard`)
) ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=9 ;

--
-- Dumping data for table `hardware`
--

INSERT INTO `hardware` (`codhard`, `nomehard`) VALUES
(1, ' '),
(2, 'Rato'),
(3, 'Teclado'),
(4, 'CDROM-DVD'),
(5, 'Monitor'),
(6, 'Unidade de Sistema (CPU)'),
(7, 'Video Projetor'),
(8, 'Quadro interativo');

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

--
-- Table structure for table `pcs`
--

CREATE TABLE IF NOT EXISTS `pcs` (
  `codpc` int(3) NOT NULL AUTO_INCREMENT,
  `nome` varchar(30) NOT NULL,
  PRIMARY KEY (`codpc`)
) ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=5 ;

--
-- Dumping data for table `pcs`
--

INSERT INTO `pcs` (`codpc`, `nome`) VALUES
(1, 'Professor'),
(2, 'PC1'),
(3, 'PC2'),
(4, 'PC3');

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

--
-- Table structure for table `salas`
--

CREATE TABLE IF NOT EXISTS `salas` (
  `codsala` int(11) DEFAULT NULL,
  `sala` varchar(52) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `salas`
--

INSERT INTO `salas` (`codsala`, `sala`) VALUES
(1, 'LAB 1.01'),
(2, 'LAB 1.02'),
(3, 'LAB 1.03'),
(4, 'LAB 1.04'),
(5, 'LAB 2.01'),
(6, 'LAB 2.02'),
(7, 'LAB 2.03'),
(8, 'LAB 2.04'),
(9, 'LAB 2.05'),
(10, 'SALA 0.01'),
(11, 'SALA 0.02'),
(12, 'SALA 0.03'),
(13, 'SALA 0.04'),
(14, 'SALA 0.05'),
(15, 'SALA 0.06'),
(16, 'SALA 0.07'),
(17, 'SALA 0.08'),
(18, 'SALA 0.09'),
(19, 'SALA 1.01'),
(20, 'SALA 1.02'),
(21, 'SALA 1.03'),
(22, 'SALA 1.05'),
(23, 'SALA 1.06'),
(24, 'SALA 1.07'),
(25, 'SALA 1.08'),
(26, 'SALA 1.09'),
(27, 'SALA 1.10'),
(28, 'SALA 1.11'),
(29, 'SALA 2.01'),
(30, 'SALA 2.02'),
(31, 'SALA 2.03'),
(32, 'SALA 2.04'),
(33, 'SALA 2.05'),
(34, 'SALA 2.06'),
(35, 'SALA 2.07'),
(36, 'SALA 2.08'),
(37, 'SALA 2.09'),
(38, 'SALA 2.10'),
(39, 'SALA 2.11'),
(40, 'SALA 2.12'),
(41, 'SALA 2.13'),
(42, 'SALA 2.14'),
(43, 'SALA 2.15'),
(44, 'SALA 2.16'),
(45, 'SALA 2.17'),
(46, 'SALA 2.18'),
(47, 'SALA 2.19'),
(48, 'SALA 2.20'),
(49, 'SALA 2.21'),
(50, 'SALA 2.22'),
(51, 'SALA 2.23'),
(52, 'SALA 2.24'),
(53, 'SALA 2.25'),
(54, 'SALA 2.26'),
(55, 'SALA 2.27'),
(56, 'SALA 2.28'),
(57, 'SALA Docentes'),
(58, 'SALA DTurma'),
(59, 'SALA Conselho'),
(60, 'SALA Psicologia'),
(61, 'DEP Físico Química'),
(62, 'DEP Biologia Geologia'),
(63, 'DEP Artes'),
(64, 'DEP Filosofia'),
(65, 'DEP Línguas'),
(66, 'DEP Matemática'),
(67, 'DEP Informática'),
(68, 'DEP Edu. Física'),
(69, 'DEP Ciências S Humanas'),
(70, 'Cursos Profissionais'),
(71, 'GAM. PROM. SUCESSO'),
(72, 'Direção'),
(73, 'Secretaria'),
(74, 'Museu'),
(75, 'Biblioteca'),
(76, 'GIAE - Loja Aluno'),
(77, 'GIAE - Bar'),
(78, 'GIAE - Refeitório'),
(79, 'GIAE - PBX'),
(80, 'GIAE - Quiosque'),
(81, 'SEC Direção'),
(82, 'SEC Expediente'),
(83, 'Auditório');

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

--
-- Table structure for table `software`
--

CREATE TABLE IF NOT EXISTS `software` (
  `codsoft` int(3) NOT NULL AUTO_INCREMENT,
  `nomesoft` varchar(50) NOT NULL,
  PRIMARY KEY (`codsoft`),
  KEY `codsoft` (`codsoft`),
  KEY `codsoft_2` (`codsoft`)
) ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=7 ;

--
-- Dumping data for table `software`
--

INSERT INTO `software` (`codsoft`, `nomesoft`) VALUES
(1, ' '),
(2, 'Windows'),
(3, 'Microsoft Office'),
(4, 'Utilactas'),
(5, 'Sumários'),
(6, 'Alunos');

