<?php

namespace Database\Seeders;

use Illuminate\Support\Str;
use App\Models\api\v1\Space;
use Illuminate\Database\Seeder;
use Illuminate\Database\Console\Seeds\WithoutModelEvents;

class SpaceSeeder extends Seeder
{
    /**
     * Run the database seeds.
     */
    public function run(): void
    {
        if(Space::count()== 0)
        {
            Space::create([
                "uuid"              => Str::uuid(),
                "code"              => rand(1000,9999),
                "name"              => "Espace Solibra",
                "address1"          => "Marcory - espace Solibra",
                "municipality"      => "Marcory",
                "city"              => "Abidjan",
                "created_by"        => 1,
                "is_active"         => 1
            ]);
        }
    }
}
