<?xml version="1.0" encoding="UTF-8"?>
<schemadesigner version="6.5">
<source>
<database charset="latin1" collation="latin1_swedish_ci">ks_depo3</database>
</source>
<canvas zoom="100">
<tables>
<table name="sys_models" view="colnames">
<left>189</left>
<top>261</top>
<width>105</width>
<height>114</height>
<sql_create_table>CREATE TABLE `sys_models` (
`id` tinyint(3) unsigned NOT NULL AUTO_INCREMENT,
`table_name` varchar(256) NOT NULL COMMENT 'Table',
`class_name` varchar(256) DEFAULT NULL COMMENT 'Class',
PRIMARY KEY (`id`),
UNIQUE KEY `table_name` (`table_name`,`class_name`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=ascii</sql_create_table>
</table>
<table name="edi_message_type" view="colnames">
<left>337</left>
<top>380</top>
<width>154</width>
<height>97</height>
<sql_create_table>CREATE TABLE `edi_message_type` (
`id` tinyint(3) unsigned NOT NULL AUTO_INCREMENT,
`code` char(6) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1</sql_create_table>
</table>
<table name="edi_message" view="colnames">
<left>525</left>
<top>243</top>
<width>241</width>
<height>283</height>
<sql_create_table>CREATE TABLE `edi_message` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`component` varchar(50) DEFAULT NULL,
`read_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
`type` enum('In','Out') NOT NULL,
`interchange_sender_company_id` tinyint(5) unsigned DEFAULT NULL,
`interchange_recipient_company_id` tinyint(5) unsigned DEFAULT NULL,
`preperation_time` timestamp NULL DEFAULT NULL,
`messageReferenceNumber` char(14) DEFAULT NULL,
`message_type_id` tinyint(3) unsigned NOT NULL,
`messageRelease` char(3) DEFAULT NULL,
`data` longtext,
`status` enum('New','Processed','Error') NOT NULL,
`errror` text,
`file_name` varchar(255) DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `edi_messages_ibfk_message_type` (`message_type_id`),
KEY `edi_message_ibfk_sender` (`interchange_sender_company_id`),
KEY `edi_message_ibfk_recipient` (`interchange_recipient_company_id`),
CONSTRAINT `edi_message_ibfk_message_type` FOREIGN KEY (`message_type_id`) REFERENCES `edi_message_type` (`id`),
CONSTRAINT `edi_message_ibfk_recipient` FOREIGN KEY (`interchange_recipient_company_id`) REFERENCES `edi_company` (`id`),
CONSTRAINT `edi_message_ibfk_sender` FOREIGN KEY (`interchange_sender_company_id`) REFERENCES `edi_company` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=554 DEFAULT CHARSET=latin1</sql_create_table>
</table>
<table name="edi_message_ref" view="colnames">
<left>339</left>
<top>226</top>
<width>146</width>
<height>131</height>
<sql_create_table>CREATE TABLE `edi_message_ref` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`message_id` int(10) unsigned NOT NULL,
`sys_model_id` tinyint(3) unsigned NOT NULL,
`ref_record_id` int(10) unsigned NOT NULL,
PRIMARY KEY (`id`),
KEY `edi_message_ref_message` (`message_id`),
KEY `edi_message_ref_ibfk_model` (`sys_model_id`),
CONSTRAINT `edi_message_ref_ibfk_model` FOREIGN KEY (`sys_model_id`) REFERENCES `sys_models` (`id`),
CONSTRAINT `edi_message_ref_message` FOREIGN KEY (`message_id`) REFERENCES `edi_message` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2447 DEFAULT CHARSET=latin1</sql_create_table>
</table>
<table name="edi_company" view="colnames">
<left>824</left>
<top>313</top>
<width>134</width>
<height>114</height>
<sql_create_table>CREATE TABLE `edi_company` (
`id` tinyint(3) unsigned NOT NULL AUTO_INCREMENT,
`code` varchar(35) NOT NULL,
`ref_id` int(10) unsigned DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=latin1</sql_create_table>
</table>
</tables>
</canvas>
</schemadesigner>
|