let randomColor = require('randomcolor')

module.exports = (sequelize, DataTypes) => {
    let Transaction = sequelize.define('Transaction', {
        id: {
            type: DataTypes.BIGINT,
            primaryKey: true,
            autoIncrement: true
        },
        itemCategoryId: {
            type: DataTypes.BIGINT,
            defaultValue: 1,
            default: 1,
            allowNull: false
        },
        createdAt: {
            allowNull: false,
            type: DataTypes.DATE
        },
        updatedAt: {
            allowNull: false,
            type: DataTypes.DATE
        },
        text: {
            type: DataTypes.TEXT,
            allowNull: false,
        },
        UserId: {
            type: DataTypes.BIGINT,
        },
        boughtFromId: {
            type: DataTypes.TEXT,
        },
        limited: {
            type: DataTypes.BOOLEAN,
            defaultValue: 0,
            default: 0
        },
        priceOfPurchase: {
            type: DataTypes.BIGINT
        },
        team: {
            type: DataTypes.BOOLEAN,
            default: false
        },
        teamId: {
            type: DataTypes.BIGINT,
            default: 0
        },
        itemId: {
            type: DataTypes.BIGINT
        }
    })

    return Transaction
}
