beta / bx.model.gen
模型和服务类的生成器
1.0.7
2022-09-26 15:43 UTC
Requires
- php: >=7.2
- ext-json: *
- beta/bx.model: ^1.0
- nette/php-generator: ^3.5
- symfony/console: ^5.2
README
安装
composer require beta/bx.model.gen
模块安装后,在项目根目录下将可用执行文件bxgen。使用此文件可以生成模型和表格的服务类。
可用命令列表
- gen:hlblock - hl 块的类生成
- gen:iblock - 信息块类生成
- gen:section - 信息块分区类生成
- gen:table - 表格类生成
hl 块生成示例
./bxgen gen:hlblock MyHLBlock my.module -c someCategory
其中
- MyHLBlock - hl 块的代码
- my.module - 将生成代码的模块名称
- -c [名称类别] - 指定类别,非必须选项
信息块生成示例
./bxgen gen:iblock type code my.module -c someCategory
其中
- type - 信息块类型
- code - 信息块代码
- my.module - 将生成代码的模块名称
信息块分区生成示例
./bxgen gen:section type code my.module -c someCategory
其中
- type - 信息块类型
- code - 信息块代码
- my.module - 将生成代码的模块名称
- -c [名称类别] - 指定类别,非必须选项
表格生成示例
./bxgen gen:table table my.module -c someCategory -b BaseName
其中
- table - 表名称
- my.module - 将生成代码的模块名称
- -c [名称类别] - 指定类别,非必须选项
- -b [类的基本名称] - 指定生成类的基本名称(BaseNameService, BaseNameModel, BaseNameTable)