import {ORMUser, Singleton, Unit, CommandLine, Inject} from '@extollo/lib'
import {User} from './models/User.model'
import {StandupDirective} from './cli/directive/StandupDirective'

@Singleton()
export class AppUnit extends Unit {
    @Inject()
    protected readonly cli!: CommandLine

    async up(): Promise<void> {
        this.container().registerStaticOverride(ORMUser, User)
        this.cli.registerDirective(StandupDirective)
    }
}
