room reservation model, controller, seeder and migration files added

This commit is contained in:
Kiss Dávid
2026-04-01 12:13:38 +02:00
parent 821ec88882
commit b281724a1a
7 changed files with 330 additions and 0 deletions
@@ -0,0 +1,21 @@
import { BaseSchema } from '@adonisjs/lucid/schema'
export default class extends BaseSchema {
protected tableName = 'rooms'
async up() {
this.schema.createTable(this.tableName, (table) => {
table.increments('id')
table.string('name').notNullable()
table.integer('capacity').notNullable()
table.string('description').nullable()
table.timestamp('created_at')
table.timestamp('updated_at')
})
}
async down() {
this.schema.dropTable(this.tableName)
}
}