Added Hellcase Battle job
All checks were successful
Push image to registry / build-image (push) Successful in 5m59s
All checks were successful
Push image to registry / build-image (push) Successful in 5m59s
Still need testing and making proper notifications
This commit is contained in:
17
app/Models/HellcaseBattle.php
Normal file
17
app/Models/HellcaseBattle.php
Normal file
@ -0,0 +1,17 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class HellcaseBattle extends Model
|
||||
{
|
||||
protected $fillable = [
|
||||
"battle_id",
|
||||
"value",
|
||||
];
|
||||
|
||||
public function getUrl() {
|
||||
return "https://hellcase.com/casebattle/{$this->battle_id}";
|
||||
}
|
||||
}
|
@ -21,6 +21,16 @@ class Job extends Model
|
||||
return $this->hasMany(JobInfo::class)->with("jobInfoType")->orderBy("created_at");
|
||||
}
|
||||
|
||||
/**
|
||||
* Get an associative collection of the job infos with their values
|
||||
* @return \Illuminate\Database\Eloquent\Collection<string, string>>
|
||||
*/
|
||||
public function jobInfosTable() {
|
||||
return $this->jobInfos->mapWithKeys(function ($jobInfo) {
|
||||
return [$jobInfo->key => $jobInfo->value];
|
||||
});
|
||||
}
|
||||
|
||||
public function jobRuns()
|
||||
{
|
||||
return $this->hasMany(JobRun::class)->orderBy("created_at");
|
||||
|
Reference in New Issue
Block a user