feat: establish reservation portal foundation
This commit is contained in:
23
app/Domain/Reservations/Models/AssetBlock.php
Normal file
23
app/Domain/Reservations/Models/AssetBlock.php
Normal file
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
|
||||
namespace App\Domain\Reservations\Models;
|
||||
|
||||
use App\Domain\Inventory\Models\SnipeAsset;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
|
||||
class AssetBlock extends Model
|
||||
{
|
||||
protected $fillable = ['snipe_asset_id', 'starts_at', 'ends_at', 'reason', 'created_by'];
|
||||
|
||||
protected function casts(): array
|
||||
{
|
||||
return ['starts_at' => 'immutable_datetime', 'ends_at' => 'immutable_datetime'];
|
||||
}
|
||||
|
||||
/** @return BelongsTo<SnipeAsset, $this> */
|
||||
public function asset(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(SnipeAsset::class, 'snipe_asset_id');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user