module.exports = (sequelize, type) => {
    const Ketexamtest = sequelize.define('ketexamtests', {
        id: {
            type: type.INTEGER,
            primaryKey: true,
            autoIncrement: true
        },
        ketexam_name: {
            type: type.STRING,
            unique: {
                args: true,
                msg: 'Oops. Looks like Ket Test already exist.'
            }
        },
        certi_id: type.INTEGER,
        course_id: { type: type.STRING, get: function () { return this.getDataValue('course_id').split(',') } },
        acronums: { type: type.TEXT, allowNull: true, get: function () { return this.getDataValue('acronums') ? this.getDataValue('acronums').split(',') : [] } },
        time: type.STRING,
        status: {
            type: type.INTEGER,
            defaultValue: 0
        }
    })
    return Ketexamtest;
}