// src/models/unit.js
const { DataTypes } = require('sequelize');
const sequelize = require('../config/database');

const Unit = sequelize.define('Unit', {
    unit_id: {
        type: DataTypes.UUID,
        defaultValue: DataTypes.UUIDV4,
        primaryKey: true,
    },
    unit_name: {
        type: DataTypes.STRING,
        allowNull: false,
    },
    unit_description: {
        type: DataTypes.STRING,
        allowNull: true,
    },
}, {
    tableName: 'unit',
    timestamps: false,
    underscored: true,
});

module.exports = Unit;
