created model for eve regions

This commit is contained in:
2020-05-14 22:25:13 -05:00
parent 5d12167324
commit 7f5c40b996
4 changed files with 108 additions and 0 deletions

View File

@@ -0,0 +1,42 @@
<?php
namespace App\Console\Commands;
use Illuminate\Console\Command;
class GetEveRegions extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'command:name';
/**
* The console command description.
*
* @var string
*/
protected $description = 'Command description';
/**
* Create a new command instance.
*
* @return void
*/
public function __construct()
{
parent::__construct();
}
/**
* Execute the console command.
*
* @return mixed
*/
public function handle()
{
//
}
}

View File

@@ -0,0 +1,34 @@
<?php
namespace App\Jobs;
use Illuminate\Bus\Queueable;
use Illuminate\Queue\SerializesModels;
use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Foundation\Bus\Dispatchable;
class GetEveRegionsJob implements ShouldQueue
{
use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
/**
* Create a new job instance.
*
* @return void
*/
public function __construct()
{
//
}
/**
* Execute the job.
*
* @return void
*/
public function handle()
{
//
}
}

View File

@@ -0,0 +1,24 @@
<?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class EveRegion extends Model
{
//Table Name
protected $table = 'eve_regions';
//Timestamps
public $timestamps = false;
/**
* Variables which are mass assignable
*
* @var array
*/
protected $fillable = [
'region_id',
'region_name',
];
}

View File

@@ -13,6 +13,14 @@ class CreateBuyPublicContractsTable extends Migration
*/
public function up()
{
if(!Schema::hasTable('eve_regions')) {
Schema::create('eve_regions', function (Blueprint $table) {
$table->unsignedBigIncrements('id');
$table->unsignedBigInteger('region_id');
$table->string('region_name');
});
}
if(!Schema::hasTable('public_contracts')) {
Schema::create('public_contracts', function(Blueprint $table) {
$table->unsignedBigIncrements('id');