%PDF- %PDF-
| Direktori : /home/opti/workflow/src/models/ |
| Current File : /home/opti/workflow/src/models/organization.js |
'use strict';
module.exports = (sequelize, DataTypes) => {
const Organization = sequelize.define('Organization', {
name: DataTypes.STRING,
description: DataTypes.STRING,
address: DataTypes.STRING,
city: DataTypes.STRING,
state: DataTypes.STRING,
country: DataTypes.STRING,
postalCode: DataTypes.STRING,
email: DataTypes.STRING,
phone: DataTypes.STRING,
createdBy: DataTypes.INTEGER,
updatedBy: DataTypes.INTEGER
}, {});
Organization.associate = function(models) {
// associations can be defined here
Organization.belongsTo(models.Certificate, {foreignKey: 'id', as: 'Certificate'});
};
return Organization;
}