import { Model, DataTypes } from 'sequelize';
import { sequelize } from '../../../utils/sequelize.js';

class PromotionalGift extends Model {}

PromotionalGift.init(
  {
    id: {
      type: DataTypes.INTEGER,
      primaryKey: true,
      autoIncrement: true},
    name: {
      type: DataTypes.STRING,
      allowNull: false},
    description: {
      type: DataTypes.TEXT,
      allowNull: true},
    value: {
      type: DataTypes.INTEGER,
      allowNull: false,
      defaultValue: 0}},
  {
    sequelize,
    modelName: 'PromotionalGift',
    tableName: 'promotional_gift',
    schema: 'falukant_type',
    timestamps: false,
    underscored: true}
);

export default PromotionalGift;
