Sequelize typescript


```typeimport { Sequelize, Model, DataTypes, Optional } from "sequelize";const sequelize = new Sequelize("mysql://root:asd123@localhost:3306/mydb");// We recommend you declare an interface for the attributes, for stricter typecheckinginterface UserAttributes {  id: number;  name: string;}// Some fields are optional when calling UserModel.create() or UserModel.build()interface UserCreationAttributes extends Optional<UserAttributes, "id"> {}// We need to declare an interface for our model that is basically what our class would beinterface UserInstance  extends Model<UserAttributes, UserCreationAttributes>,    UserAttributes {}const UserModel = sequelize.define<UserInstance>("User", {  id: {    primaryKey: true,    type: DataTypes.INTEGER.UNSIGNED,  },  name: {    type: DataTypes.STRING,  },});async function doStuff() {  const instance = await UserModel.findByPk(1, {    rejectOnEmpty: true,  });  console.log(instance.id);}```











