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