-- MySQL dump 9.09
--
-- Host: localhost    Database: hardware
---------------------------------------------------------
-- Server version	4.0.15

--
-- Table structure for table `dokumente`
--

CREATE TABLE dokumente (
  d_id int(11) NOT NULL auto_increment,
  d_stand timestamp(14) NOT NULL,
  d_eingangsdatum date NOT NULL default '0000-00-00',
  d_user_id int(11) NOT NULL default '0',
  d_datei varchar(50) NOT NULL default '',
  d_orgname varchar(100) NOT NULL default '',
  d_mime varchar(50) NOT NULL default '',
  d_groesse int(11) NOT NULL default '0',
  d_zeigeimmer enum('1','0') NOT NULL default '0',
  d_bem text NOT NULL,
  PRIMARY KEY  (d_id)
) TYPE=MyISAM COMMENT='Tabelle der Dateien';

--
-- Table structure for table `festplatte`
--

CREATE TABLE festplatte (
  fp_id int(11) NOT NULL auto_increment,
  fp_hersteller varchar(100) NOT NULL default '',
  fp_name varchar(100) NOT NULL default '',
  fp_groesse varchar(50) NOT NULL default '',
  fp_anschluss varchar(50) NOT NULL default '',
  fp_bem text NOT NULL,
  PRIMARY KEY  (fp_id)
) TYPE=MyISAM;

--
-- Table structure for table `gd`
--

CREATE TABLE gd (
  gd_id int(11) NOT NULL auto_increment,
  gd_g_id int(11) NOT NULL default '0',
  gd_d_id int(11) NOT NULL default '0',
  gd_user_id int(11) NOT NULL default '0',
  gd_datum date NOT NULL default '0000-00-00',
  PRIMARY KEY  (gd_id)
) TYPE=MyISAM COMMENT='Verknuepfung Dokumente zu Geraete';

--
-- Table structure for table `geraet`
--

CREATE TABLE geraet (
  g_id int(11) NOT NULL auto_increment,
  g_deleted enum('0','1') NOT NULL default '0',
  g_zeitstempel timestamp(14) NOT NULL,
  g_bearbeiter varchar(50) NOT NULL default '',
  g_lieferdatum date NOT NULL default '0000-00-00',
  g_typ varchar(100) NOT NULL default '',
  g_status varchar(100) NOT NULL default '',
  g_hs_id int(11) NOT NULL default '0',
  g_lief_id int(11) NOT NULL default '0',
  g_fp_id int(11) NOT NULL default '0',
  g_so_id int(11) NOT NULL default '0',
  g_sn varchar(50) NOT NULL default '',
  g_invnr varchar(50) NOT NULL default '',
  g_mac varchar(50) NOT NULL default '',
  g_garantie varchar(50) NOT NULL default '',
  g_extras text NOT NULL,
  g_bem text NOT NULL,
  g_takt varchar(50) NOT NULL default '',
  g_cpu varchar(100) NOT NULL default '',
  g_mem varchar(100) NOT NULL default '',
  g_modell varchar(100) NOT NULL default '',
  g_board varchar(100) NOT NULL default '',
  g_grafik varchar(100) NOT NULL default '',
  g_netzkarte varchar(100) NOT NULL default '',
  g_monitortyp varchar(100) NOT NULL default '',
  g_monitordiag varchar(50) NOT NULL default '',
  g_druckertyp varchar(50) NOT NULL default '',
  g_druckerdpi varchar(50) NOT NULL default '',
  g_historie text NOT NULL,
  PRIMARY KEY  (g_id),
  KEY g_lieferdatum (g_lieferdatum),
  KEY g_zeitstempel (g_zeitstempel)
) TYPE=MyISAM;

--
-- Table structure for table `hersteller`
--

CREATE TABLE hersteller (
  hs_id int(11) NOT NULL auto_increment,
  hs_name varchar(100) NOT NULL default '',
  hs_web varchar(100) NOT NULL default '',
  hs_bem text NOT NULL,
  PRIMARY KEY  (hs_id),
  UNIQUE KEY hs_name (hs_name)
) TYPE=MyISAM COMMENT='Herstellerinformationen';

--
-- Table structure for table `lieferant`
--

CREATE TABLE lieferant (
  lief_id int(11) NOT NULL auto_increment,
  lief_name varchar(100) NOT NULL default '',
  lief_web varchar(100) NOT NULL default '',
  lief_tel varchar(100) NOT NULL default '',
  lief_kdnr varchar(100) NOT NULL default '',
  lief_bem text NOT NULL,
  PRIMARY KEY  (lief_id),
  UNIQUE KEY lief_name (lief_name)
) TYPE=MyISAM;

--
-- Table structure for table `log`
--

CREATE TABLE log (
  log_zeitstempel timestamp(14) NOT NULL,
  log_host varchar(50) NOT NULL default '',
  log_sessionid varchar(250) NOT NULL default '',
  log_user_id int(11) NOT NULL default '0',
  log_aktion varchar(200) NOT NULL default '',
  log_detail text NOT NULL,
  KEY log_zeitstempel (log_zeitstempel)
) TYPE=MyISAM;

--
-- Table structure for table `sessions`
--

CREATE TABLE sessions (
  s_id bigint(20) NOT NULL auto_increment,
  s_sessionid varchar(250) NOT NULL default '',
  s_lastseen datetime NOT NULL default '0000-00-00 00:00:00',
  s_user_id int(11) NOT NULL default '0',
  s_remotehost varchar(200) NOT NULL default '',
  PRIMARY KEY  (s_id)
) TYPE=MyISAM;

--
-- Table structure for table `standort`
--

CREATE TABLE standort (
  so_id int(11) NOT NULL auto_increment,
  so_gebaeude varchar(50) NOT NULL default '',
  so_raum varchar(50) NOT NULL default '',
  so_user varchar(100) NOT NULL default '',
  so_bem text NOT NULL,
  PRIMARY KEY  (so_id)
) TYPE=MyISAM COMMENT='Standorte';

--
-- Table structure for table `user`
--

CREATE TABLE user (
  user_id int(11) NOT NULL auto_increment,
  user_account varchar(50) NOT NULL default '',
  user_vorname varchar(50) NOT NULL default '',
  user_nachname varchar(50) NOT NULL default '',
  user_passwort varchar(250) NOT NULL default '',
  user_bem text NOT NULL,
  user_logincount bigint(20) NOT NULL default '0',
  user_lastlogin datetime NOT NULL default '0000-00-00 00:00:00',
  user_isadmin enum('1','0') NOT NULL default '0',
  user_readonly enum('1','0') NOT NULL default '0',
  user_isblocked enum('1','0') NOT NULL default '0',
  user_canviewhw enum('1','0') NOT NULL default '0',
  user_canviewuser enum('1','0') NOT NULL default '0',
  user_canchangehispwd enum('1','0') NOT NULL default '1',
  user_canchangeuser enum('1','0') NOT NULL default '0',
  user_canchangehw enum('1','0') NOT NULL default '0',
  user_canaddhw enum('1','0') NOT NULL default '0',
  user_canviewlog enum('1','0') NOT NULL default '0',
  user_list_sort varchar(50) NOT NULL default '',
  user_list_ascdesc varchar(50) NOT NULL default '',
  user_list_offset varchar(50) NOT NULL default '',
  user_list_showdeleted varchar(50) NOT NULL default '',
  user_list_showrun varchar(50) NOT NULL default '',
  user_list_showproof varchar(50) NOT NULL default '',
  user_list_moreinfo varchar(50) NOT NULL default '',
  user_list_suche varchar(50) NOT NULL default '',
  user_list_zusuchen varchar(200) NOT NULL default '',
  PRIMARY KEY  (user_id)
) TYPE=MyISAM;

