Skip to content

Commit 8617c97

Browse files
committed
fix: Update version handling and improve naming strategy documentation
1 parent e04f094 commit 8617c97

3 files changed

Lines changed: 9 additions & 6 deletions

File tree

src/Cli/CliCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,7 @@ private function help(): void
316316

317317
private function version(): void
318318
{
319-
$version = '1.0.0';
319+
$version = TBLCLASS_VERSION;
320320

321321
echo <<<VERSION
322322
\033[1mtbl-class \033[32mv{$version}\033[0m

src/Config.php

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -108,16 +108,17 @@ private function createCleanTemplate(): void
108108
# PHP namespace for the generated Tbl class
109109
namespace: ""
110110
111+
111112
# ⚠ IMPORTANT
112113
# This strategy defines ALL generated constant names.
113114
# Changing it later WILL rename constants and MAY break code.
114115
#
115116
# Strategies:
116-
# - full → users, users__email, fk__posts__users
117-
# - short → users, usr__email, fk__posts__users
118-
# - abbr → users, usr__email, fk__pst__usr
119-
# - alias → users, u__email, fk__p__u
120-
# - upper → USERS, USERS__EMAIL, FK__POSTS__USERS
117+
# - full → table, table__column, fk__table__references
118+
# - short → table, tbl__column, fk__table__references
119+
# - abbr → table, tbl__column, fk__tbl__ref
120+
# - alias → table, t__column, fk__t__r
121+
# - upper → TABLE, TABLE__COLUMN, FK__TABLE__REFERENCES
121122
naming:
122123
strategy: full
123124

src/autoload.helper.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
<?php
22

3+
define('TBLCLASS_VERSION', "1.0.0"); // version
4+
35
// Definir apenas cores que serão usadas
46
define('COLOR_RESET', "\033[0m");
57
define('COLOR_RED', "\033[91m"); // Erros

0 commit comments

Comments
 (0)