<commit_before>const Sequelize = require('sequelize');
const db = require('../index.js');

const User = db.define('user', {
    handle: {
        type: Sequelize.STRING,
        allowNull: false
    },
    password: {
        type: Sequelize.STRING,
        allowNull: false
    }
});


////////////////// THIS SHOULD HAVE ALL THE STOCK INFORMATION, BUT PortfolioStock has the info for an individual's holdings//////


// const Stock = db.define('stocks', {
//     ticker: {
//         type: Sequelize.STRING,
//         allowNull: false
//     },
//     name: {
//         type: Sequelize.STRING,
//         allowNull: false
//     },
//     newsStories: {
//         type: Sequelize.ARRAY(Sequelize.TEXT)
//     }
    
// });

const Portfolio = db.define('portfolio', {
    name: {
        type: Sequelize.STRING,
    },
    balance: {
        type: Sequelize.FLOAT,
        defaultValue: 1000000
    }
});

const PortfolioStock = db.define('portfolio_stock', {
    shares: {
        type: Sequelize.FLOAT,
        allowNull: false
    },
    buyPrice: {
        type: Sequelize.FLOAT,
        allowNull: false
    },
    ticker: {
        type: Sequelize.STRING,
        allowNull: false
    }
});

const PortfolioHistory = db.define('portfolio_history', {
    portfolio_id: {
        type: Sequelize.INTEGER,
        allowNull: false
    },
    balance: {
        type: Sequelize.FLOAT,
        allowNull: false
    }
});

const TransactionHistory = db.define('transactionHistory', {
    ticker: {
        type: Sequelize.STRING,<commit_msg>Working on portfolioHistory timestamp<commit_after>const Sequelize = require('sequelize');
const db = require('../index.js');

const User = db.define('user', {
    handle: {
        type: Sequelize.STRING,
        allowNull: false
    },
    password: {
        type: Sequelize.STRING,
        allowNull: false
    }
});


////////////////// THIS SHOULD HAVE ALL THE STOCK INFORMATION, BUT PortfolioStock has the info for an individual's holdings//////


// const Stock = db.define('stocks', {
//     ticker: {
//         type: Sequelize.STRING,
//         allowNull: false
//     },
//     name: {
//         type: Sequelize.STRING,
//         allowNull: false
//     },
//     newsStories: {
//         type: Sequelize.ARRAY(Sequelize.TEXT)
//     }
    
// });

const Portfolio = db.define('portfolio', {
    name: {
        type: Sequelize.STRING,
    },
    balance: {
        type: Sequelize.FLOAT,
        defaultValue: 1000000
    }
});

const PortfolioStock = db.define('portfolio_stock', {
    shares: {
        type: Sequelize.FLOAT,
        allowNull: false
    },
    buyPrice: {
        type: Sequelize.FLOAT,
        allowNull: false
    },
    ticker: {
        type: Sequelize.STRING,
        allowNull: false
    }
});

const PortfolioHistory = db.define('portfolio_history', {
    portfolio_id: {
        type: Sequelize.INTEGER,
        allowNull: false
    },
    balance: {
        type: Sequelize.FLOAT,
        allowNull: false
    },
    timestamp: {
        type: Sequelize.DATE,
        allowNull: false
    }
});

const TransactionHistory = db.define('transactionHistory', {
    ticker: {
        type: Sequelize.STRING,
{'fraction_non_alphanumeric': 0.14281240212965862, 'fraction_numerical': 0.004384591293454432, 'mean_word_length': 1.924908424908425, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7625222', 'n_tokens_mistral': 1016, 'n_tokens_neox': 984, 'n_words': 205}