added models for stock assets from structures
This commit is contained in:
10
app/Http/Controllers/Stock/StockController.php
Normal file
10
app/Http/Controllers/Stock/StockController.php
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Http\Controllers\Stocks;
|
||||||
|
|
||||||
|
use Illuminate\Http\Request;
|
||||||
|
|
||||||
|
class StockController extends Controller
|
||||||
|
{
|
||||||
|
//
|
||||||
|
}
|
||||||
34
app/Jobs/ProcessStocksJob.php
Normal file
34
app/Jobs/ProcessStocksJob.php
Normal 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 ProcessStocksJob 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()
|
||||||
|
{
|
||||||
|
//
|
||||||
|
}
|
||||||
|
}
|
||||||
30
app/Library/Stock/Helper/StructureStockHelper.php
Normal file
30
app/Library/Stock/Helper/StructureStockHelper.php
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* W4RP Services
|
||||||
|
* GNU Public License
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace App\Library\Stock\Helper;
|
||||||
|
|
||||||
|
//Internal Library
|
||||||
|
use Illuminate\Http\Request;
|
||||||
|
use App\Http\Controllers\Controller;
|
||||||
|
use DB;
|
||||||
|
|
||||||
|
//Job
|
||||||
|
use App\Jobs\ProcessStocksJob;
|
||||||
|
|
||||||
|
//Library
|
||||||
|
use App\Library\Esi\Esi;
|
||||||
|
|
||||||
|
//Models
|
||||||
|
use App\Models\Stock\StructureStock;
|
||||||
|
|
||||||
|
class StructureStockHelper {
|
||||||
|
public function GetStructures() {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
?>
|
||||||
35
app/Models/Stock/Asset.php
Normal file
35
app/Models/Stock/Asset.php
Normal file
@@ -0,0 +1,35 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Models\Stock;
|
||||||
|
|
||||||
|
use Illuminate\Database\Eloquent\Model;
|
||||||
|
|
||||||
|
class Asset extends Model
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Required scope:
|
||||||
|
* esi-assets.read_corporation_assets.v1
|
||||||
|
*/
|
||||||
|
|
||||||
|
//Table Name
|
||||||
|
public $table = 'alliance_asset';
|
||||||
|
|
||||||
|
//Timestamps
|
||||||
|
public $timestamps = false;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The attributes that are mass assignable
|
||||||
|
*
|
||||||
|
* @var array
|
||||||
|
*/
|
||||||
|
protected $fillable = [
|
||||||
|
'is_blueprint_copy',
|
||||||
|
'is_singleton',
|
||||||
|
'item_id',
|
||||||
|
'location_flag',
|
||||||
|
'location_id',
|
||||||
|
'location_type',
|
||||||
|
'quantity',
|
||||||
|
'type_id',
|
||||||
|
];
|
||||||
|
}
|
||||||
34
app/Models/Stock/Structure.php
Normal file
34
app/Models/Stock/Structure.php
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Models\Stock;
|
||||||
|
|
||||||
|
use Illuminate\Database\Eloquent\Model;
|
||||||
|
|
||||||
|
class Structure extends Model
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Requires the scope:
|
||||||
|
* esi-universe.read_structures.v1
|
||||||
|
*/
|
||||||
|
|
||||||
|
//Table Name
|
||||||
|
public $table = '';
|
||||||
|
|
||||||
|
//Timestamps
|
||||||
|
public $timestamps = false;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The attributes that are mass assignable
|
||||||
|
*
|
||||||
|
* @var array
|
||||||
|
*/
|
||||||
|
protected $fillable = [
|
||||||
|
'name',
|
||||||
|
'owner_id',
|
||||||
|
'position_x',
|
||||||
|
'position_y',
|
||||||
|
'position_z',
|
||||||
|
'solar_system_id',
|
||||||
|
'type_id',
|
||||||
|
];
|
||||||
|
}
|
||||||
30
app/Models/Stock/StructureStock.php
Normal file
30
app/Models/Stock/StructureStock.php
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Models\Stock;
|
||||||
|
|
||||||
|
use Illuminate\Database\Eloquent\Model;
|
||||||
|
|
||||||
|
class StructureStock extends Model
|
||||||
|
{
|
||||||
|
//Table Name
|
||||||
|
public $table = '';
|
||||||
|
|
||||||
|
//Timestamps
|
||||||
|
public $tiemestamps = false;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The attributes that are mass assignable
|
||||||
|
*
|
||||||
|
* @var array
|
||||||
|
*/
|
||||||
|
protected $fillable = [
|
||||||
|
'structure_name',
|
||||||
|
'structure_id',
|
||||||
|
'location_flag',
|
||||||
|
'location_id',
|
||||||
|
'location_type',
|
||||||
|
'item_id',
|
||||||
|
'type_id',
|
||||||
|
'quantity',
|
||||||
|
];
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user