const { DataTypes } = require('sequelize');
const sequelize = require('../config/database');

const Position = sequelize.define('Position', {
  id: {
    type: DataTypes.INTEGER,
    autoIncrement: true,
    primaryKey: true
  },
  name: {
    type: DataTypes.STRING,
    allowNull: false,
    unique: true
  },
  createdAt: {
    type: DataTypes.DATE,
    field: 'created_at'  
  },
  updatedAt: {
    type: DataTypes.DATE,
    field: 'updated_at'  
  }
}, {
  tableName: 'positions',  
  timestamps: true  
});

module.exports = Position;
