modified public contracts to show the region the public contract is in.
This commit is contained in:
@@ -58,6 +58,7 @@ class GetPublicContractsJob implements ShouldQueue
|
||||
])->count();
|
||||
if($count == 0) {
|
||||
$pub = new PublicContract;
|
||||
$pub->region_id = $this->region;
|
||||
if(isset($resp->buyout)) {
|
||||
$pub->buyout = $resp->buyout;
|
||||
}
|
||||
|
||||
@@ -18,6 +18,7 @@ class PublicContract extends Model
|
||||
* @var array
|
||||
*/
|
||||
protected $fillable = [
|
||||
'region_id',
|
||||
'buyout',
|
||||
'collateral',
|
||||
'contract_id',
|
||||
|
||||
@@ -16,6 +16,7 @@ class CreateBuyPublicContractsTable extends Migration
|
||||
if(!Schema::hasTable('public_contracts')) {
|
||||
Schema::create('public_contracts', function(Blueprint $table) {
|
||||
$table->unsignedBigIncrements('id');
|
||||
$table->unsignedBigInteger('region_id');
|
||||
$table->decimal('buyout', 17,2 )->nullable();
|
||||
$table->decimal('collateral', 17, 2)->nullable();
|
||||
$table->unsignedInteger('contract_id');
|
||||
|
||||
Reference in New Issue
Block a user