module.exports = (sequelize, DataTypes) => {
	const Notifications = sequelize.define(
		'Notifications',
		{
			id: {
				type: DataTypes.UUID,
				defaultValue: DataTypes.UUIDV4,
				primaryKey: true,
				allowNull: false,
			},
			type: {
				type: DataTypes.STRING,
				allowNull: true,
			},
			member_id: {
				type: DataTypes.UUID,
				allowNull: false,
			},
			post_id: {
				type: DataTypes.UUID,
				allowNull: true,
			},
			is_read: {
				type: DataTypes.BOOLEAN,
				allowNull: false,
				defaultValue: false,
			},
			description: {
				type: DataTypes.TEXT,
				allowNull: false,
			},
			createdAt: {
				type: DataTypes.DATE,
				allowNull: false,
				defaultValue: DataTypes.NOW,
			},
		},
		{
			tableName: 'notifications',
			timestamps: false,
		},
	);

	return Notifications;
};
