creating model sequelize
npx sequelize-cli model:generate --name User --attributes firstName:string,lastName:string,email:string
creating model sequelize
npx sequelize-cli model:generate --name User --attributes firstName:string,lastName:string,email:string
sequelize mysql Object
@sequelize.AllowNull(false)
@sequelize.Column(DataTypes.JSON)
get personalInformation(): PersonalInformation {
return JSON.parse(this.getDataValue('personalInformation'))
}
set personalInformation(val: any) {
this.setDataValue('personalInformation', JSON.stringify(val))
}
@sequelize.AllowNull(false)
@sequelize.Column(DataTypes.JSON)
get workExperinces(): WorkExperince[] {
return JSON.parse(this.getDataValue('workExperinces'))
}
set workExperinces(val: any) {
this.setDataValue('workExperinces', JSON.stringify(val))
}
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us