<?php

declare(strict_types=1);

use System\Database\Schema;

return function (): string {

    return Schema::create('users', function ($table) {

        $table->id();

        $table->string('username',50)->unique();

        $table->string('email',150)->unique();

        $table->string('password',255);

        $table->string('full_name',150);

        $table->string('phone',30)->nullable();

        $table->string('avatar',255)->nullable();

        $table->integer('failed_attempts')->default(0);

        $table->boolean('active')->default(true);

        $table->timestamps();

    });

};