// src/models/ticketModel.js const { DataTypes } = require('sequelize'); const db = require('./db'); // Define the Ticket model const Ticket = db.define('Ticket', { id: { type: DataTypes.STRING, primaryKey: true, allowNull: false, }, short_description: { type: DataTypes.STRING, allowNull: false, }, description: { type: DataTypes.TEXT, allowNull: true, }, state: { type: DataTypes.STRING, allowNull: false, }, priority: { type: DataTypes.STRING, allowNull: true, }, created_at: { type: DataTypes.DATE, allowNull: false, defaultValue: DataTypes.NOW, }, updated_at: { type: DataTypes.DATE, allowNull: false, defaultValue: DataTypes.NOW, }, }, { timestamps: false, // Disable automatic timestamps }); // Export the Ticket model module.exports = Ticket;