feat(member-notes): enhance member note functionality with structured data and observation tracking
All checks were successful
Deploy tt-tagebuch / deploy (push) Successful in 58s
All checks were successful
Deploy tt-tagebuch / deploy (push) Successful in 58s
This commit is contained in:
@@ -22,6 +22,40 @@ const MemberNote = sequelize.define('MemberNote', {
|
||||
return decryptData(encryptedValue);
|
||||
}
|
||||
},
|
||||
kind: {
|
||||
type: DataTypes.ENUM('general', 'strength', 'development', 'training_focus'),
|
||||
allowNull: false,
|
||||
defaultValue: 'general',
|
||||
},
|
||||
trainingFocus: {
|
||||
type: DataTypes.TEXT,
|
||||
allowNull: true,
|
||||
field: 'training_focus',
|
||||
set(value) {
|
||||
this.setDataValue('trainingFocus', value ? encryptData(value) : null);
|
||||
},
|
||||
get() {
|
||||
const encryptedValue = this.getDataValue('trainingFocus');
|
||||
return encryptedValue ? decryptData(encryptedValue) : null;
|
||||
}
|
||||
},
|
||||
sourceType: {
|
||||
type: DataTypes.STRING,
|
||||
allowNull: true,
|
||||
field: 'source_type',
|
||||
},
|
||||
sourceLabel: {
|
||||
type: DataTypes.TEXT,
|
||||
allowNull: true,
|
||||
field: 'source_label',
|
||||
set(value) {
|
||||
this.setDataValue('sourceLabel', value ? encryptData(value) : null);
|
||||
},
|
||||
get() {
|
||||
const encryptedValue = this.getDataValue('sourceLabel');
|
||||
return encryptedValue ? decryptData(encryptedValue) : null;
|
||||
}
|
||||
},
|
||||
memberId: {
|
||||
type: DataTypes.INTEGER,
|
||||
allowNull: false,
|
||||
|
||||
Reference in New Issue
Block a user