当前位置:网站首页>Typeorm automatically generates entity classes

Typeorm automatically generates entity classes

2022-07-07 22:21:00 Belden wind

have access to typeorm-cli Automatic generation

1. install typeorm-cli

npm nstall -g typeorm-cli

2. Use

After installation, it can be installed in typeorm The project root directory allows typeorm-cli That's all right.

3 To configure

Under the changed directory ormconfig.json Add the configuration

4 Custom template

Add under root ormEntityTemplate.ejs file , Implement custom templates

5 Be careful

  • At present, only mysql
  • The naming rules are underlined
  • If the current one is different from the last one , It will be backed up automatically
原网站

版权声明
本文为[Belden wind]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/02/202202130607021628.html