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
+33
View File
@@ -0,0 +1,33 @@
import { BaseSeeder } from '@adonisjs/lucid/seeders'
import Room from '#models/room'
export default class extends BaseSeeder {
async run() {
await Room.updateOrCreate(
{ name: 'Kisterem' },
{
name: 'Kisterem',
capacity: 20,
description: 'Cozy small room for private gatherings.',
}
)
await Room.updateOrCreate(
{ name: 'Nagyterem' },
{
name: 'Nagyterem',
capacity: 50,
description: 'Large hall for big events and weddings.',
}
)
await Room.updateOrCreate(
{ name: 'Terasz' },
{
name: 'Terasz',
capacity: 30,
description: 'Outdoor terrace with a view.',
}
)
}
}