Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to generate class based model of mssql in sequelize-auto #632

Open
Hammasali47 opened this issue Dec 22, 2022 · 1 comment
Open

How to generate class based model of mssql in sequelize-auto #632

Hammasali47 opened this issue Dec 22, 2022 · 1 comment

Comments

@Hammasali47
Copy link

I am using sequelize auto command like this

sequelize-auto -h -d -u -x [password] -p [port] --dialect [dialect] -c [/path/to/config] -o [/path/to/models] -t [tableName]

however sequelize-auto generate model of that table in functional form.Is there any way to generate class based model of mssql database using sequelize-auto?

@abdulbari149
Copy link

Hello, You can use the --lang option to switch to es6/esm/ts to switch to the class based init method, instead of the define method.

sequelize-auto -h -d -u -x [password] -p [port] --dialect [dialect] -c [/path/to/config] -o [/path/to/models] -t [tableName] --lang es6

This will solve your problem

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants