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

module.exports = (sequelize, DataTypes) => {
	const SharedPosts = sequelize.define(
		'SharedPosts',
		{
			id: {
				type: UUID,
				defaultValue: UUIDV4,
				primaryKey: true,
				allowNull: false,
			},
			member_id: {
				type: UUID,
				allowNull: false,
			},
			post_id: {
				type: UUID,
				allowNull: false,
			},
			content: {
				type: TEXT,
				allowNull: true,
			},
		},
		{
			tableName: 'shared_posts',
			timestamps: true,
		},
	);
	return SharedPosts;
};
