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

const Supplier = sourcingDb.define('Supplier', {
    name: { type: DataTypes.STRING, allowNull: false },
    website: { type: DataTypes.STRING, unique: true },
    category: { type: DataTypes.ENUM('OEM', 'PMA', 'Distributor', 'MRO'), defaultValue: 'Distributor' },
    country: { type: DataTypes.STRING }
}, { tableName: 'suppliers', timestamps: false });

module.exports = Supplier;