<commit_before>import * as Sequelize from "sequelize"

export interface MessageAttributes {
    body: string
    ServicechainId: string,
    contact: string
    is_reply_to: string | null | undefined
    direction: string,
    sent_time?: Date,
    message_state: string
}

export interface MessageInstance extends Sequelize.Instance<MessageAttributes> {
    id: string,
    createdAt: Date,
    updatedAt: Date,

    body: string
    ServicechainId: string,
    contact: string
    is_reply_to: string | null | undefined
    direction: string,
    sent_time: Date,
    message_state: string
}

export default function (sequelize: Sequelize.Sequelize, DataTypes: Sequelize.DataTypes) {
    var Message = sequelize.define('Message', {

        id: {
            type: DataTypes.UUIDV4,
            primaryKey: true,
            defaultValue: DataTypes.UUIDV4
        },
        body: DataTypes.STRING(1024),
        contact: DataTypes.BIGINT,
        is_reply_to: DataTypes.STRING,
        direction: DataTypes.ENUM('INBOUND', 'OUTBOUND'),
        sent_time: DataTypes.DATE,
        message_state: DataTypes.ENUM('MSG_PENDING',
            'MSG_SENDING',
            'MSG_SENT',
            'MSG_DELIVERED_SERVICE',
            'MSG_DELIVERED_USER',
            'MSG_READ',
            'MSG_REPLIED',<commit_msg>Corrected bug where contact ID in DB was INT not UUID<commit_after>import * as Sequelize from "sequelize"

export interface MessageAttributes {
    body: string
    ServicechainId: string,
    contact: string
    is_reply_to: string | null | undefined
    direction: string,
    sent_time?: Date,
    message_state: string
}

export interface MessageInstance extends Sequelize.Instance<MessageAttributes> {
    id: string,
    createdAt: Date,
    updatedAt: Date,

    body: string
    ServicechainId: string,
    contact: string
    is_reply_to: string | null | undefined
    direction: string,
    sent_time: Date,
    message_state: string
}

export default function (sequelize: Sequelize.Sequelize, DataTypes: Sequelize.DataTypes) {
    var Message = sequelize.define('Message', {

        id: {
            type: DataTypes.UUIDV4,
            primaryKey: true,
            defaultValue: DataTypes.UUIDV4,
        },
        body: DataTypes.STRING(1024),
        contact: DataTypes.UUID,
        is_reply_to: DataTypes.UUID,
        direction: DataTypes.ENUM('INBOUND', 'OUTBOUND'),
        sent_time: DataTypes.DATE,
        message_state: DataTypes.ENUM('MSG_PENDING',
            'MSG_SENDING',
            'MSG_SENT',
            'MSG_DELIVERED_SERVICE',
            'MSG_DELIVERED_USER',
            'MSG_READ',
            'MSG_REPLIED',
{'fraction_non_alphanumeric': 0.08913125235050771, 'fraction_numerical': 0.0045129748025573525, 'mean_word_length': 2.6289222373806274, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '621513', 'n_tokens_mistral': 803, 'n_tokens_neox': 795, 'n_words': 183}