<?xml version="1.0" encoding="UTF-8"?>
<schemadesigner version="6.5">
<source>
<database charset="latin1" collation="latin1_swedish_ci">coalmar_20200504</database>
</source>
<canvas zoom="100">
<tables>
<table name="d3n_notification" view="colnames">
<left>393</left>
<top>283</top>
<width>134</width>
<height>219</height>
<sql_create_table>CREATE TABLE `d3n_notification` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`sys_company_id` smallint(5) unsigned NOT NULL,
`time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
`sys_model_id` tinyint(3) unsigned NOT NULL,
`model_record_id` int(10) unsigned NOT NULL,
`key` int(10) unsigned NOT NULL,
`status_id` smallint(5) unsigned NOT NULL,
`type_id` smallint(5) unsigned DEFAULT NULL,
`data` text CHARACTER SET utf8,
PRIMARY KEY (`id`),
KEY `sys_model_id` (`sys_model_id`),
KEY `status_id` (`status_id`),
KEY `sys_company_id` (`sys_company_id`),
KEY `d3n_notification_ibfk_type` (`type_id`),
CONSTRAINT `d3n_notification_ibfk_status` FOREIGN KEY (`status_id`) REFERENCES `d3n_status` (`id`),
CONSTRAINT `d3n_notification_ibfk_sys_model` FOREIGN KEY (`sys_model_id`) REFERENCES `sys_models` (`id`),
CONSTRAINT `d3n_notification_ibfk_type` FOREIGN KEY (`type_id`) REFERENCES `d3n_type` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2228 DEFAULT CHARSET=latin1</sql_create_table>
</table>
<table name="sys_models" view="colnames">
<left>575</left>
<top>468</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=10 DEFAULT CHARSET=ascii</sql_create_table>
</table>
<table name="d3n_status" view="colnames">
<left>719</left>
<top>401</top>
<width>116</width>
<height>131</height>
<sql_create_table>CREATE TABLE `d3n_status` (
`id` smallint(5) unsigned NOT NULL AUTO_INCREMENT,
`sys_model_id` tinyint(3) unsigned NOT NULL,
`status_id` tinyint(3) unsigned NOT NULL,
`label` varchar(50) CHARACTER SET utf8 DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `id` (`id`),
KEY `sys_model_id` (`sys_model_id`),
CONSTRAINT `d3n_status_ibfk_1` FOREIGN KEY (`sys_model_id`) REFERENCES `sys_models` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=latin1</sql_create_table>
</table>
<table name="d3n_status_history" view="colnames">
<left>570</left>
<top>216</top>
<width>117</width>
<height>148</height>
<sql_create_table>CREATE TABLE `d3n_status_history` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`notification_id` int(10) unsigned NOT NULL,
`status_id` smallint(5) unsigned NOT NULL,
`time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
`user_id` int(10) unsigned DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `notification_id` (`notification_id`),
KEY `status_id` (`status_id`),
CONSTRAINT `d3n_status_history_ibfk_notification` FOREIGN KEY (`notification_id`) REFERENCES `d3n_notification` (`id`),
CONSTRAINT `d3n_status_history_ibfk_status` FOREIGN KEY (`status_id`) REFERENCES `d3n_status` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=1602 DEFAULT CHARSET=latin1</sql_create_table>
</table>
<table name="d3n_type" view="colnames">
<left>245</left>
<top>454</top>
<width>116</width>
<height>131</height>
<sql_create_table>CREATE TABLE `d3n_type` (
`id` smallint(5) unsigned NOT NULL AUTO_INCREMENT,
`sys_model_id` tinyint(3) unsigned NOT NULL,
`type_id` tinyint(3) unsigned NOT NULL,
`label` varchar(50) CHARACTER SET utf8 DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `id` (`id`),
KEY `sys_model_id` (`sys_model_id`),
CONSTRAINT `d3n_type_ibfk_sys_model` FOREIGN KEY (`sys_model_id`) REFERENCES `sys_models` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=latin1</sql_create_table>
</table>
</tables>
</canvas>
</schemadesigner>
|