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

const Promocode = sequelize.define('promocode', {
    id: {type: DataTypes.INTEGER, primaryKey: true, unique: true, autoIncrement: true},
    code: {type: DataTypes.STRING, unique: true},
    activations: {type: DataTypes.INTEGER, defaultValue: 1},
    users: {type: DataTypes.ARRAY(DataTypes.BIGINT)},
    money: {type: DataTypes.INTEGER, defaultValue: 100}
})

module.exports = Promocode;
