inital commit
This commit is contained in:
29
models/InstitutionContactPerson.js
Normal file
29
models/InstitutionContactPerson.js
Normal file
@@ -0,0 +1,29 @@
|
||||
const { DataTypes } = require('sequelize');
|
||||
|
||||
module.exports = (sequelize) => {
|
||||
const InstitutionContactPerson = sequelize.define('InstitutionContactPerson', {
|
||||
institution_id: {
|
||||
type: DataTypes.INTEGER,
|
||||
references: {
|
||||
model: 'Institution',
|
||||
key: 'id'
|
||||
},
|
||||
onUpdate: 'CASCADE',
|
||||
onDelete: 'CASCADE'
|
||||
},
|
||||
contact_person_id: {
|
||||
type: DataTypes.INTEGER,
|
||||
references: {
|
||||
model: 'ContactPerson',
|
||||
key: 'id'
|
||||
},
|
||||
onUpdate: 'CASCADE',
|
||||
onDelete: 'CASCADE'
|
||||
}
|
||||
}, {
|
||||
tableName: 'InstitutionContactPerson',
|
||||
timestamps: false
|
||||
});
|
||||
|
||||
return InstitutionContactPerson;
|
||||
};
|
||||
Reference in New Issue
Block a user