diff --git a/design/schema/.gitignore b/design/schema/.gitignore deleted file mode 100644 index d35f24c5..00000000 --- a/design/schema/.gitignore +++ /dev/null @@ -1,37 +0,0 @@ -.vscode -*.swp -*.swo -*.sublime-* -*.pyc -jmeter.log -__pycache__ -tmp/ -package-lock.json -node_modules/ -sftp-config.json -.DS_Store -*.iml -*.ipr -*.iws -*.idea -~$*.xls* -~$*.ppt* -~$*.doc* -nohup.out - -CMakeLists.txt.user -CMakeCache.txt -CMakeFiles -CMakeScripts -Testing -Makefile -build -build-* -cmake_install.cmake -install_manifest.txt -compile_commands.json -CTestTestfile.cmake -_deps -.env -.fid -_build diff --git a/design/schema/README.md b/design/schema/README.md deleted file mode 100644 index 41a876b6..00000000 --- a/design/schema/README.md +++ /dev/null @@ -1,15 +0,0 @@ -# 数据字典 - -生成春松客服数据库数据字典。 - -## Prerequisite - -* Php -* pandoc - -## Generate - -``` -cp sample.env .env -./bin/gen-mysql-table-dicts.sh -``` \ No newline at end of file diff --git a/design/schema/app/generator.php b/design/schema/app/generator.php deleted file mode 100644 index 8f85bc00..00000000 --- a/design/schema/app/generator.php +++ /dev/null @@ -1,123 +0,0 @@ - $v){ - $sql = 'SELECT * FROM '; - $sql .= 'INFORMATION_SCHEMA.TABLES '; - $sql .= 'WHERE '; - $sql .= "table_name = '{$v['TABLE_NAME']}' AND table_schema = '".DB_NAME."'"; - $table_result = mysqli_query($conn, $sql); - while($t = mysqli_fetch_array($table_result)) { - $tables [$k] ['TABLE_COMMENT'] = $t ['TABLE_COMMENT']; - } - - $sql = 'SELECT * FROM '; - $sql .= 'INFORMATION_SCHEMA.COLUMNS '; - $sql .= 'WHERE '; - $sql .= "table_name = '{$v['TABLE_NAME']}' AND table_schema = '".DB_NAME."'"; - - $fields = array(); - $field_result = mysqli_query($conn, $sql); - while($t = mysqli_fetch_array($field_result)) { - $fields [] = $t; - } - $tables [$k] ['COLUMN'] = $fields; -} -mysqli_close($conn); - -$content = ''; -// 循环所有表 -foreach($tables as $k => $v){ - $content .= '
字段名 | 数据类型 | 默认值 | -允许非空 | -自动递增 | 备注 |
---|---|---|---|---|---|
' . $f ['COLUMN_NAME'] . ' | '; - $content .= '' . $f ['COLUMN_TYPE'] . ' | '; - $content .= '' . $f ['COLUMN_DEFAULT'] . ' | '; - $content .= '' . $f ['IS_NULLABLE'] . ' | '; - $content .= '' . ($f ['EXTRA'] == 'auto_increment' ? '是' : ' ') . ' | '; - $content .= '' . $f ['COLUMN_COMMENT'] . ' | '; - $content .= '
版本:$version,SQL:下载链接,Models PDF:下载链接
-$content - - -- 春松客服, https://www.cskefu.com -
- -