module.exports = (sequelize, type) => {
    const ClientCohort = sequelize.define('clientcohorts', {
        id: {
            type: type.INTEGER,
            primaryKey: true,
            autoIncrement: true
        },
        user_id: type.INTEGER,
        cohortIds: {
            type: type.TEXT,
            allowNull: true,
            get: function () { return this.getDataValue('cohortIds').split(',') }
        },
        status: {
            type: type.INTEGER,
            defaultValue: 0
        }
    })
    return ClientCohort;
}