<commit_before>"use strict";

module.exports = function(sequelize, DataTypes) {
    var network = sequelize.define('network', {
        name: {
            type: DataTypes.STRING,
            allowNull: false,
            comment: "Name of the collected network"
        },
        date: {
            type: DataTypes.DATEONLY,
            allowNull: true,
            comment: "Collection date"
        },
        localisation: {
            type: DataTypes.GEOMETRY
        },
        description: {
            type: DataTypes.TEXT,
            comment: "Description of the network collected"
        },
        public: {
            type: DataTypes.BOOLEAN,
            allowNull:false,
            comment: "Is this network is available publicly?"
        },
        all_interactions: {
          type: DataTypes.BOOLEAN,
          comment: "Is the network recording ALL presence AND absence of interactions",
          defaultValue: false,
          allowNull:false
        }
    }, {
        underscored: true,
        classMethods: {
            associate: function(models) {
                network.hasMany(models.network, {
                    onDelete: 'cascade'
                })
            },
            indexes: [{
                name: 'idx_network_date',
                method: 'BTREE',
                fields: ['date']
            }, {
                name: 'idx_network_name',
                method: 'BTREE',
                fields: ['name']
            }, {

            }]
        }
    });
    return network
};<commit_msg>change relationship within network model<commit_after>"use strict";

module.exports = function(sequelize, DataTypes) {
    var network = sequelize.define('network', {
        name: {
            type: DataTypes.STRING,
            allowNull: false,
            comment: "Name of the collected network"
        },
        date: {
            type: DataTypes.DATEONLY,
            allowNull: true,
            comment: "Collection date"
        },
        localisation: {
            type: DataTypes.GEOMETRY
        },
        description: {
            type: DataTypes.TEXT,
            comment: "Description of the network collected"
        },
        public: {
            type: DataTypes.BOOLEAN,
            allowNull:false,
            comment: "Is this network is available publicly?"
        },
        all_interactions: {
          type: DataTypes.BOOLEAN,
          comment: "Is the network recording ALL presence AND absence of interactions",
          defaultValue: false,
          allowNull:false
        }
    }, {
        underscored: true,
        classMethods: {
            associate: function(models) {
                network.hasMany(models.taxon, {
                    onDelete: 'cascade'
                })
            },
            indexes: [{
                name: 'idx_network_date',
                method: 'BTREE',
                fields: ['date']
            }, {
                name: 'idx_network_name',
                method: 'BTREE',
                fields: ['name']
            }, {

            }]
        }
    });
    return network
};
{'fraction_non_alphanumeric': 0.09670188920909382, 'fraction_numerical': 0.0, 'mean_word_length': 1.312361213915618, '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': '760688', 'n_tokens_mistral': 790, 'n_tokens_neox': 771, 'n_words': 184}