Mojolicious::Command::generate::DBIxCustomModel - generate DBIx::Custom model directory structure
Version 1.0.2
Usage: APPLICATION generate DBIxCustomModel [OPTIONS] mojo generate DBIxCustomModel -p MyApp -l lib -c generate_model.conf mojo generate DBIxCustomModel --package MyApp --lib lib --conf generate_model.conf Options: -h, --help Show this summary of available options -p, --package the package of generate model on ,defaults "MyApp" -l, --lib lib path ,defaults "lib" -c, --config config file Config: content of config fiel { base => { # base mode config sdel => "is_deleted", # sremove field ctime => "create_time",# create time field mtime => "update_time",# update time field code=> ' # user defiend code sub abc{ } ' }, models => { # the key is table name table_name=>{ # table model config sdel => "is_deleted", # sremove field ctime => "create_time",# create time field mtime => "update_time",# update time field code=> ' # user defiend code sub abc{ } ' } } }
可以在配置文件中进行以下配置:
{ base => { # 对 base_package 的配置 sdel => "is_deleted", # 软删除字段 ctime => "create_time",# 创建时间字段 mtime => "update_time",# 更新时间字段 code=> ' # 用户自定义扩展代码 sub abc{ } ' }, models => { # 以表名为key,对各个表的配置 table_name=>{ # 对 base_package 的配置 sdel => "is_deleted", # 软删除字段 ctime => "create_time",# 创建时间字段 mtime => "update_time",# 更新时间字段 code=> ' # 用户自定义扩展代码 sub abc{ } ' } } }
WFSO, <461663376@qq.com>
<461663376@qq.com>
To install Mojolicious::Command::generate::DBIxCustomModel, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Mojolicious::Command::generate::DBIxCustomModel
CPAN shell
perl -MCPAN -e shell install Mojolicious::Command::generate::DBIxCustomModel
For more information on module installation, please visit the detailed CPAN module installation guide.