const { DataTypes } = require('sequelize'); const { sequelize } = require('../config/database'); const HotService = sequelize.define( 'HotService', { id: { type: DataTypes.INTEGER, primaryKey: true, autoIncrement: true, }, name_zh: { type: DataTypes.STRING(100), allowNull: false, }, name_en: { type: DataTypes.STRING(100), allowNull: false, }, name_es: { type: DataTypes.STRING(100), allowNull: false, }, service_type: { type: DataTypes.STRING(50), allowNull: false, defaultValue: 'travel', comment: '服务类型: travel(出行), accommodation(住宿), guide(导游), translation(翻译), consulting(咨询), other(其他)', }, image_url: { type: DataTypes.STRING(500), allowNull: true, }, detail_image: { type: DataTypes.STRING(500), allowNull: true, comment: '详情图URL', }, link_url: { type: DataTypes.STRING(500), allowNull: true, }, sort_order: { type: DataTypes.INTEGER, defaultValue: 0, }, is_active: { type: DataTypes.BOOLEAN, defaultValue: true, }, }, { tableName: 'hot_services', timestamps: true, underscored: true, createdAt: 'created_at', updatedAt: 'updated_at', } ); module.exports = HotService;