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

const Sponsor = sequelize.define('Sponsor', {
  id: {
    type: DataTypes.INTEGER,
    primaryKey: true,
    autoIncrement: true
  },
  activityId: {
    type: DataTypes.INTEGER,
    allowNull: false
  },
  name: {
    type: DataTypes.STRING,
    allowNull: false
  },
  logo: DataTypes.STRING,
  type: {
    type: DataTypes.ENUM('title', 'sponsor'),
    defaultValue: 'sponsor'
  },
  link: DataTypes.STRING
});

module.exports = Sponsor;
