<?php

use Illuminate\Database\Seeder;

class PatchSeeder extends Seeder
{
    /**
     * Run the database seeds.
     *
     * @return void
     */
    public function run()
    {
        \App\Models\Project::where('id', '>', 0)->update(['active' => 1]);
        \App\Models\RentType::truncate();
        $rent_types = ['小时', '台班', '趟', '天', '月', '立方米', '米'];
        foreach($rent_types as $key => $type) {
            \App\Models\RentType::create([
                'name' => $type,
                'sort' => ($key + 1)
            ]);
        }
    }
}
