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