added model for registered corp mining observers

This commit is contained in:
2020-05-09 09:11:59 -05:00
parent cf00909444
commit 5607763fd4
3 changed files with 45 additions and 0 deletions

View File

@@ -15,6 +15,11 @@ class CorpMoonObserver extends Model
//Timestamps //Timestamps
public $timestamps = true; public $timestamps = true;
/**
* Attributes that are mass assignable
*
* @var array
*/
protected $fillable = [ protected $fillable = [
'corporation_id', 'corporation_id',
'corporation_name', 'corporation_name',

View File

@@ -0,0 +1,29 @@
<?php
namespace App\Models\Moon;
use Illuminate\Database\Eloquent\Model;
class CorpObserversRegistered extends Model
{
//Table Name
protected $table = 'corp_mining_observers_registered';
//Primary Key
public $primaryKey = 'id';
//Timestamps
public $timestamps = true;
/**
* Attributes that are mass assignable
*
* @var array
*/
protected $fillable = [
'character_id',
'character_name',
'corporation_id',
'corporation_name',
];
}

View File

@@ -76,6 +76,17 @@ class CreateRentalMoonLedgerTables extends Migration
$table->timestamps(); $table->timestamps();
}); });
} }
if(!Schema::hasTable('corp_mining_observers_registered')) {
Schema::create('corp_mining_observers_registered', function(Blueprint $table) {
$table->unsignedBigIncrements('id');
$table->unsignedBigInteger('character_id');
$table->string('character_name');
$table->unsignedBigInteger('corporation_id');
$table->string('corporation_name');
$table->timestamps();
});
}
} }
/** /**