import { BaseSchema } from '@adonisjs/lucid/schema';
export default class extends BaseSchema {
    tableName = 'scammer_keywords';
    async up() {
        this.schema.createTable(this.tableName, (table) => {
            table.increments('id');
            table.string('keyword', 200).notNullable();
            table.enum('action', ['log', 'warn', 'kick', 'block']).notNullable().defaultTo('warn');
            table.boolean('is_active').notNullable().defaultTo(true);
            table.text('notes').nullable();
            table.integer('hit_count').notNullable().defaultTo(0);
            table.integer('added_by').unsigned().nullable().references('id').inTable('users').onDelete('SET NULL');
            table.timestamp('created_at');
            table.timestamp('updated_at');
        });
    }
    async down() {
        this.schema.dropTable(this.tableName);
    }
}
