import type { ApplicationContract } from '@ioc:Adonis/Core/Application'
import Phish from 'App/Models/Phish'

export default class AppProvider {
    constructor(protected app: ApplicationContract) {}

    public register() {
        // Register your own bindings
    }

    public async boot() {
        // IoC container is ready
        const { BaseModel } = await import('@ioc:Adonis/Lucid/Orm')
        const CamelCaseNamingStrategy = (await import('App/Strategies/CamelCaseNamingStrategy'))
            .default
        BaseModel.namingStrategy = new CamelCaseNamingStrategy()
    }

    public async ready() {
        // App is ready
        await import('../start/socket')
    }

    public async shutdown() {
        // Cleanup, since app is going down
    }
}
