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