<?php

namespace Database\Seeders;

use Illuminate\Database\Seeder;
use Illuminate\Support\Facades\DB;

class DatabaseSeeder extends Seeder
{
    /**
     * Seed the application's database.
     *
     * @return void
     */
    public function run()
    {
        DB::beginTransaction();

        // Admin
        $this->call(AdminsTableSeeder::class);
        $this->call(AdminPermissionsTableSeeder::class);

        // User
        $this->call(UsersTableSeeder::class);
        $this->call(UserPermissionsTableSeeder::class);

        // Soda Vendor Machine
        $this->call(SodaVendorMachine\SodaVendorContractTemplatesTableSeeder::class);
        $this->call(SodaVendorMachine\SodaVendorContractTemplateObligationsTableSeeder::class);
        $this->call(SodaVendorMachine\SodaVendorContractTemplateObligationDependenciesTableSeeder::class);
        $this->call(SodaVendorMachine\SodaVendorEntitiesTableSeeder::class);
        $this->call(SodaVendorMachine\SodaVendorEntitySignaturesTableSeeder::class);
        $this->call(SodaVendorMachine\SodaVendorContractsTableSeeder::class);
        $this->call(SodaVendorMachine\SodaVendorContractEntitiesTableSeeder::class);
        $this->call(SodaVendorMachine\SodaVendorContractObligationsTableSeeder::class);
        $this->call(SodaVendorMachine\SodaVendorContractObligationDependenciesTableSeeder::class);

        // Courier Deliver Servive
        $this->call(CourierDeliverService\CourierDeliverServiceContractTemplateTableSeeder::class);
        $this->call(CourierDeliverService\CourierDeliverServiceContractTemplateObligationsTableSeeder::class);
        $this->call(CourierDeliverService\CourierDeliverServiceContractTemplateObligationDependenciesTableSeeder::class);
        $this->call(CourierDeliverService\CourierDeliverServiceEntitiesTableSeeder::class);
        $this->call(CourierDeliverService\CourierDeliverServiceEntitySignaturesTableSeeder::class);
        $this->call(CourierDeliverService\CourierDeliverServicesContractTableSeeder::class);
        $this->call(CourierDeliverService\CourierDeliverServiceContractEntitiesTableSeeder::class);
        $this->call(CourierDeliverService\CourierDeliverServiceContractObligationsTableSeeder::class);
        $this->call(CourierDeliverService\CourierDeliverServiceContractObligationDependenciesTableSeeder::class);

        DB::commit();
    }
}
