%PDF- %PDF-
Direktori : /home/opti/workflow/src/models/ |
Current File : /home/opti/workflow/src/models/jobcategory.js |
'use strict'; module.exports = (sequelize, DataTypes) => { const JobCategory = sequelize.define('JobCategory', { uuid: { type: DataTypes.UUID, defaultValue: DataTypes.UUIDV4 }, orgId: DataTypes.INTEGER, title: DataTypes.STRING, description: DataTypes.STRING, }, {}); JobCategory.associate = function(models) { // associations can be defined here JobCategory.hasMany(models.JobTitle, {foreignKey: 'CategoryId', sourceKey: 'id', as: 'titles'}); }; return JobCategory; };