# egg-sequelize-ts-auto

> egg.js Typescript 自动生成sequelize model文件

Latest version **1.0.2** (published 2021-02-03) · MIT license · 0 weekly downloads

## Install

```sh
npm install egg-sequelize-ts-auto
pnpm add egg-sequelize-ts-auto
yarn add egg-sequelize-ts-auto
bun add egg-sequelize-ts-auto
```

Provides the command `egg-sequelize-ts-auto`.

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.2 |
| Published | 2021-02-03 |
| First published | 2020-08-30 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=0.10 |
| Dependencies | 6 |
| Unpacked size | 67.9 KB |
| Known vulnerabilities | 0 (+8 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 0 |
| Author | liuhuanhui |
| Maintainers | liuhuanhui |
| Keywords | egg, typescript, sequelize, auto |

## Links

- npm: https://www.npmjs.com/package/egg-sequelize-ts-auto
- Repository: https://github.com/liuhuanhui/sequelize-auto
- Homepage: https://github.com/liuhuanhui/sequelize-auto#readme
- Issues: https://github.com/liuhuanhui/sequelize-auto/issues
- npm.io page: https://npm.io/package/egg-sequelize-ts-auto

## Dependencies (6)

- [async](https://npm.io/package/async.md) ^2.1.5
- [yargs](https://npm.io/package/yargs.md) ^8.0.1
- [eslint](https://npm.io/package/eslint.md) ^3.19.0
- [mkdirp](https://npm.io/package/mkdirp.md) ^0.5.1
- [sequelize](https://npm.io/package/sequelize.md) ^3.30.2
- [graceful-fs-extra](https://npm.io/package/graceful-fs-extra.md) ^2.0.0

## Alternatives

- [@openai/codex-sdk](https://npm.io/package/@openai/codex-sdk.md) — 731.4K weekly downloads
- [babel-plugin-transform-react-jsx](https://npm.io/package/babel-plugin-transform-react-jsx.md) — 565.0K weekly downloads
- [babel-helper-remove-or-void](https://npm.io/package/babel-helper-remove-or-void.md) — 508.5K weekly downloads
- [@pnpm/store-controller-types](https://npm.io/package/@pnpm/store-controller-types.md) — 186.9K weekly downloads
- [react-native-signature-canvas](https://npm.io/package/react-native-signature-canvas.md) — 155.6K weekly downloads

## Recent versions

- 1.0.2 (latest) — 2021-02-03
- 1.0.1 — 2021-02-02
- 1.0.0 — 2020-10-19
- 2.0.1 — 2020-08-30

## README

# Sequelize-Auto For Eggjs
Base on [Sequelize-Auto]('https://github.com/sequelize/sequelize-auto)

**Support typescript option**

## Install
```
npm install -g egg-sequelize-ts-auto  or  npm install egg-sequelize-ts-auto
```
you also have to install `@types/sequelize` in you eggjs project

```
npm i @types/sequelize
```


## typescript example
###### In you eggjs project root
```
./node_modules/.bin/egg-sequelize-ts-auto -d database -h localhost -p 3306 -u root -x 1234 --dialect mysql -o app/model -z -g model
```
###### install global npm
```
  egg-sequelize-ts-auto -d database -h localhost -p 3306 -u root -x 1234 --dialect mysql -o app/model -z -g model
```
`-z` for typescript , `-g model` load model at `ctx.model`

you will get some ts file in app/model

**Now you can go on with typescript**

---
_Source: https://npm.io/package/egg-sequelize-ts-auto · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
