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

const Project = sequelize.define('Project', {
    project_id: {
        type: DataTypes.UUID,
        defaultValue: DataTypes.UUIDV4,
        primaryKey: true,
    },
    project_name: {
        type: DataTypes.STRING,
        allowNull: false,
    },
    project_detail: {
        type: DataTypes.TEXT,
        allowNull: true,
    },
    project_startdate: {
        type: DataTypes.DATEONLY,
        allowNull: false,
    },
    project_stopdate: {
        type: DataTypes.DATEONLY,
        allowNull: true,
    },
    project_lat: {  
        type: DataTypes.STRING,
        allowNull: true,
         
    },
    project_long: {  
        type: DataTypes.STRING,
        allowNull: true,
         
    }
},
 {
    tableName: 'project',
    timestamps: false,
    underscored: true,
});

module.exports = Project;
