sequelize mysql json type
@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))
}