0.0.15 • Published 5 years ago

typeorm-model-generator-plus v0.0.15

Weekly downloads
-
License
MIT
Repository
-
Last release
5 years ago

typeorm-model-generator-plus

具体使用方式参见 typeorm-model-generator


该版本只支持 MySQL,且与源版本有如下区别

  • 生成 model 时不生成 name
  • 不生成 Index....
  • 生成 model 时增加 comment(字段描述)
  • 默认值就是字符串,不用函数包裹
  • 可指定生成某个表,使用方式:-t tableName
  • bigint 转换为 js 类型时转换为 number
  • 配置文件名字不同 .tomg-config.json
  • mysql -> mysql2

示例:仅为 user 表生成 model

typeorm-model-generator-plus -h <host> -d <database> -p [port] -u <user> -x -t user

.tomg-config.json 示例

[
  {
    "host": "localhost",
    "port": 3306,
    "databaseName": "test",
    "user": "root",
    "password": "123456",
    "databaseType": "mysql",
    "schemaName": "",
    "ssl": false,
    "tableName": "user"
  },
  {
    "resultsPath": "./output",
    "noConfigs": false,
    "convertCaseFile": "none",
    "convertCaseEntity": "pascal",
    "convertCaseProperty": "none",
    "propertyVisibility": "none",
    "lazy": false,
    "activeRecord": true,
    "generateConstructor": false,
    "customNamingStrategyPath": "",
    "relationIds": false,
    "strictMode": false,
    "skipSchema": false
  }
]

安装

npm install -g typeorm-model-generator-plus
0.0.15

5 years ago

0.0.14

5 years ago

0.0.11

6 years ago

0.0.12

6 years ago

0.0.13

6 years ago

0.0.10

6 years ago

0.0.9

6 years ago

0.0.8

6 years ago

0.0.7

6 years ago

0.0.6

6 years ago

0.0.5

6 years ago

0.0.3

6 years ago

0.0.4

6 years ago

0.0.2

6 years ago

0.0.1

6 years ago