2023-05-30 13:52:17 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace App\Models;
|
|
|
|
|
|
|
|
class ApplicationPreview extends BaseModel
|
|
|
|
{
|
2023-09-01 13:52:18 +00:00
|
|
|
protected $guarded = [];
|
2023-08-08 09:51:36 +00:00
|
|
|
|
2023-05-30 13:52:17 +00:00
|
|
|
static function findPreviewByApplicationAndPullId(int $application_id, int $pull_request_id)
|
|
|
|
{
|
|
|
|
return self::where('application_id', $application_id)->where('pull_request_id', $pull_request_id)->firstOrFail();
|
|
|
|
}
|
2023-08-08 09:51:36 +00:00
|
|
|
|
|
|
|
public function application()
|
|
|
|
{
|
|
|
|
return $this->belongsTo(Application::class);
|
|
|
|
}
|
2023-05-30 13:52:17 +00:00
|
|
|
}
|