mirror of
https://github.com/archtechx/airwire-demo.git
synced 2025-12-12 08:34:03 +00:00
public release
This commit is contained in:
commit
d6d22f8355
115 changed files with 67218 additions and 0 deletions
25
app/Models/Report.php
Normal file
25
app/Models/Report.php
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
|
||||
class Report extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
public static function booted()
|
||||
{
|
||||
static::saving(function (self $report) {
|
||||
// $report->status ??= collect(['pending', 'resolved', 'invalid'])->random();
|
||||
$report->status ??= 'pending';
|
||||
});
|
||||
}
|
||||
|
||||
public function assignee(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(User::class);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue