adding bonds
This commit is contained in:
42
app/Console/Commands/Finances/AllianceBondsCommand.php
Normal file
42
app/Console/Commands/Finances/AllianceBondsCommand.php
Normal file
@@ -0,0 +1,42 @@
|
||||
<?php
|
||||
|
||||
namespace App\Console\Commands\Finances;
|
||||
|
||||
use Illuminate\Console\Command;
|
||||
|
||||
class AllianceBondsCommand 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 int
|
||||
*/
|
||||
public function handle()
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
27
app/Http/Controllers/Finances/AdminWarpedBondsController.php
Normal file
27
app/Http/Controllers/Finances/AdminWarpedBondsController.php
Normal file
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers\Finances;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
class AdminWarpedBondsController extends Controller
|
||||
{
|
||||
public function __construct() {
|
||||
$this->middleware('auth');
|
||||
$this->middleware('role:Admin');
|
||||
$this->middleware('permission:admin.bonds');
|
||||
}
|
||||
|
||||
public function DisplayNewBondForm() {
|
||||
|
||||
}
|
||||
|
||||
public function StoreNewBond() {
|
||||
|
||||
}
|
||||
|
||||
public function DeleteBond() {
|
||||
|
||||
}
|
||||
}
|
||||
26
app/Http/Controllers/Finances/WarpedBondsController.php
Normal file
26
app/Http/Controllers/Finances/WarpedBondsController.php
Normal file
@@ -0,0 +1,26 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers\Finances;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
class WarpedBondsController extends Controller
|
||||
{
|
||||
public function __construct() {
|
||||
$this->middleware('auth');
|
||||
$this->middleware('role:User');
|
||||
}
|
||||
|
||||
public function DisplayAvailableBonds() {
|
||||
|
||||
}
|
||||
|
||||
public function StoreBonds() {
|
||||
|
||||
}
|
||||
|
||||
public function RedeemBonds() {
|
||||
|
||||
}
|
||||
}
|
||||
50
app/Jobs/ProcessAllianceBond.php
Normal file
50
app/Jobs/ProcessAllianceBond.php
Normal file
@@ -0,0 +1,50 @@
|
||||
<?php
|
||||
|
||||
namespace App\Jobs;
|
||||
|
||||
//Internal Library
|
||||
use Illuminate\Bus\Queueable;
|
||||
use Illuminate\Contracts\Queue\ShouldQueue;
|
||||
use Illuminate\Foundation\Bus\Dispatchable;
|
||||
use Illuminate\Queue\InteractsWithQueue;
|
||||
use Illuminate\Queue\SerializesModels;
|
||||
use Log;
|
||||
use DB;
|
||||
|
||||
//App Library
|
||||
use Seat\Eseye\Cache\NullCache;
|
||||
use Seat\Eseye\Configuration;
|
||||
use Seat\Eseye\Containers\EsiAuthentication;
|
||||
use Seat\Eseye\Eseye;
|
||||
use Seat\Eseye\Exceptions\RequestFailedException;
|
||||
use App\Jobs\Library\JobHelper;
|
||||
|
||||
//App Models
|
||||
use App\Models\Jobs\JobStatus;
|
||||
use App\Models\Finances\AllianceBond;
|
||||
use App\Models\Finances\Bondee;
|
||||
|
||||
class ProcessAllianceBond 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()
|
||||
{
|
||||
//
|
||||
}
|
||||
}
|
||||
40
app/Models/Finances/AllianceBond.php
Normal file
40
app/Models/Finances/AllianceBond.php
Normal file
@@ -0,0 +1,40 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\Finances;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class AllianceBond extends Model
|
||||
{
|
||||
/**
|
||||
* Table Name
|
||||
*/
|
||||
protected $table = 'alliance_bonds';
|
||||
|
||||
/**
|
||||
* Timestamps
|
||||
*/
|
||||
public $timestamps = true;
|
||||
|
||||
/**
|
||||
* The attributes which are mass assignable
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $fillable = [
|
||||
'id',
|
||||
'full_bond_amount',
|
||||
'remaining_bond_amount',
|
||||
'bond_id',
|
||||
'character_id',
|
||||
];
|
||||
|
||||
public function bonders() {
|
||||
return $this->hasMany('App\Models\Finances\Bondee', 'character_id', 'character_id');
|
||||
}
|
||||
|
||||
public function getBondId() {
|
||||
return $this->bond_id;
|
||||
}
|
||||
|
||||
}
|
||||
22
app/Models/Finances/Bondee.php
Normal file
22
app/Models/Finances/Bondee.php
Normal file
@@ -0,0 +1,22 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\Finances;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class Bondee extends Model
|
||||
{
|
||||
protected $table = 'alliance_bondees';
|
||||
|
||||
protected $fillable = [
|
||||
'character_id',
|
||||
'character_name',
|
||||
'corporation_id',
|
||||
'corporation_name',
|
||||
'bond_id',
|
||||
];
|
||||
|
||||
public function allianceBond() {
|
||||
return $this->belongsTo(AllianceBond::class);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user