ascwh/data_dictionary

MySql 生成表结构,并返回 html、Markdown、json格式

v1.0.0 2022-07-15 02:33 UTC

This package is not auto-updated.

Last update: 2024-04-19 10:33:00 UTC


README

根据MySql注释生成对应的数据字典生结构,并返回 html、Markdown、json格式


$db  = [
	// [required]
	'type'      => 'mysql',
	'host'      => '127.0.0.1',
	'database'  => 'test',
	'username'  => 'root',
	'password'  => 'root',
	// [optional]
	'charset'   => 'utf8mb4',
	'collation' => 'utf8mb4_general_ci',
	'port'      => 3306,
	// [optional] The table prefix. All table names will be prefixed as PREFIX_table.
	'prefix'    => 'doc_',
];
$doc = new Dictionary();
echo $doc->make($db,'html');

输入图片说明