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

module.exports = (sequelize, DataTypes) => {
	const ActivityItineraries = sequelize.define(
		'ActivityItineraries',
		{
			id: {
				type: UUID,
				defaultValue: UUIDV4,
				allowNull: false,
				primaryKey: true,
			},
			activity_id: {
				type: UUID,
				allowNull: false,
			},
			title: {
				type: STRING,
				allowNull: false,
			},
			description: {
				type: TEXT,
				allowNull: true,
			},
			longitude: {
				type: DECIMAL(11, 8),
				allowNull: true,
			},
			latitude: {
				type: DECIMAL(10, 8),
				allowNull: true,
			},
			icon: {
				type: STRING,
				allowNull: true,
			},
			order: {
				type: INTEGER,
				allowNull: false,
			},
		},
		{
			tableName: 'activity_itineraries',
			timestamps: false,
		},
	);
	return ActivityItineraries;
};
