mineadmin / components

mine-admin library
Apache License 2.0
10 stars 21 forks source link

add mine basemodel getTable fun to rewrite getTable fun when generato… #82

Closed faizel-88 closed 4 months ago

faizel-88 commented 4 months ago

add mine basemodel getTable fun to rewrite getTable fun when generator model can omit the $table variable

boring-cyborg[bot] commented 4 months ago

Thanks for opening this pull request! Please check out our contributing guidelines.

zds-s commented 4 months ago

重写这个干嘛?什么场景

faizel-88 commented 4 months ago

image 复制模型文件的时候红框的地方可以省掉,规范约定大于配置。原getTable方法的约定是复数形式的。

faizel-88 commented 4 months ago

生成的模型注释里面的@method,链式调用的时候蛮好使的,到时候我提个pr,使用命令生成$table这部分代码应该怎么去掉?

zds-s commented 4 months ago

隐式table,有点tp风格==

zds-s commented 4 months ago

往 hyperf 那边提把。生成 model 的命令用的是 hyperf 的 gen:model 。默认是都带着表名的,在 mine 这重写意义不大,除非生成model 了再手动删掉 table