BEGIN TRANSACTION;
CREATE TABLE IF NOT EXISTS `EquipmentType` (
	`EqpmtType_num`	INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
	`Description`	TEXT
);
INSERT INTO `EquipmentType` VALUES (1,'Vehicle');
INSERT INTO `EquipmentType` VALUES (2,'Communication');
CREATE TABLE IF NOT EXISTS `Technician` (
	`Technician_ID`	INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
	`LastName`	TEXT,
	`FirstName`	TEXT,
	`N_Telephone`	TEXT
);
INSERT INTO `Technician` VALUES (1,'Denis','Albert','+33 6 54 32 10 98');
INSERT INTO `Technician` VALUES (2,'Bon','Jean','+33 1 23 45 67 89');
CREATE TABLE IF NOT EXISTS `MadeCallOut` (
	`CallOut_num`	INTEGER NOT NULL,
	`Technician_ID`	INTEGER
);
INSERT INTO `MadeCallOut` VALUES (1,2);
INSERT INTO `MadeCallOut` VALUES (2,1);
CREATE TABLE IF NOT EXISTS `CallOut` (
	`CallOut_num`	INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
	`Observations`	TEXT,
	`Nature`	TEXT,
	`StockTake_num`	INTEGER
);
INSERT INTO `CallOut` VALUES (1,'OK','Faire le plein',1);
INSERT INTO `CallOut` VALUES (2,'OK','Verifier la ligne',2);
CREATE TABLE IF NOT EXISTS `Equipment` (
	`StockTake_num`	INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
	`Color`	TEXT,
	`Description`	TEXT,
	`EqpmtType_num`	INTEGER,
	`Employee_ID`	INTEGER
);
INSERT INTO `Equipment` VALUES (1,'Rouge','Corvette',1,2);
INSERT INTO `Equipment` VALUES (2,'Cuivre','Ligne telephonique',2,1);

CREATE TABLE IF NOT EXISTS `Team` (
	`Team_ID`	INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
	`Name`	TEXT
);
INSERT INTO `Team` VALUES (1,'Sales');
INSERT INTO `Team` VALUES (2,'Real stuff');


CREATE TABLE IF NOT EXISTS `Employee` (
	`Employee_ID`	INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
	`LastName`	TEXT,
	`FirstName`	TEXT,
	`Address`	TEXT,
	`Team_ID`	INTEGER,
	`Office_num`	INTEGER
);
INSERT INTO `Employee` VALUES (1,'Dupont','Jean','ici ou la',1,2);
INSERT INTO `Employee` VALUES (2,'Duval','Marie','surtout la',2,1);
INSERT INTO `Employee` VALUES (3,'Martin','Pierre','un peu ici',2,3);
CREATE TABLE IF NOT EXISTS `Office` (
	`Office_num`	INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
	`Surface`	REAL
);
INSERT INTO `Office` VALUES (1,23.5);
INSERT INTO `Office` VALUES (2,10.3);
INSERT INTO `Office` VALUES (3,9.2);
COMMIT;
