Model controllers added

This commit is contained in:
Kiss Dávid
2025-07-28 13:00:46 +02:00
parent 590adb271d
commit 465613f6a0
17 changed files with 470 additions and 100 deletions
@@ -0,0 +1,23 @@
import { BaseSchema } from '@adonisjs/lucid/schema'
export default class extends BaseSchema {
protected tableName = 'restaurant_menu_items'
async up() {
this.schema.createTable(this.tableName, (table) => {
table.increments('id').primary()
table.integer('restaurant_menu_id').unsigned().references('restaurant_menus.id')
table.string('name').notNullable()
table.integer('price_small').notNullable()
table.integer('price_large').notNullable()
table.string('description').nullable()
table.timestamp('created_at')
table.timestamp('updated_at')
})
}
async down() {
this.schema.dropTable(this.tableName)
}
}