const { TEXT, ENUM, UUID, UUIDV4 } = require('sequelize');

module.exports = (sequelize, DataTypes) => {
    const HelpDesk = sequelize.define(
        'HelpDesk',
        {
            id: {
                type: UUID,
                defaultValue: UUIDV4,
                allowNull: false,
                primaryKey: true,
            },
            member_id: {
				type: UUID,
				allowNull: false,
			},
            concern: {
                type: TEXT,
                allowNull: false
            },
            message: {
                type: TEXT,
                allowNull: true,
            },
            status: {
                type: ENUM('OPEN', 'CLOSED'),
                allowNull: false,
                defaultValue: 'OPEN'
            }
        },
        {
            tableName: 'help_desk',
            timestamps: true
        },
    );

    return HelpDesk;
};
