Answers for "sequelize mysql json type"

0

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))
	}
Posted by: Guest on September-01-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language