mirror of
https://github.com/HDInnovations/UNIT3D-Community-Edition.git
synced 2026-02-10 21:49:36 -06:00
- github action updated with new ruleset in pint.json - codebase linted with new ruleset - contributors can now run `./vendor/bin/pint` - action workflow will auto correct any lint issues upon commit/opened pull request
39 lines
778 B
PHP
39 lines
778 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use App\Traits\Auditable;
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
class TicketAttachment extends Model
|
|
{
|
|
use Auditable;
|
|
use HasFactory;
|
|
|
|
protected $appends = [
|
|
'full_disk_path',
|
|
];
|
|
|
|
public function getFullDiskPathAttribute(): string
|
|
{
|
|
return $this->disk_path.''.$this->file_name;
|
|
}
|
|
|
|
/**
|
|
* Belongs To A User.
|
|
*/
|
|
public function user(): \Illuminate\Database\Eloquent\Relations\BelongsTo
|
|
{
|
|
return $this->belongsTo(User::class);
|
|
}
|
|
|
|
/**
|
|
* Belongs To A Ticket.
|
|
*/
|
|
public function ticket(): \Illuminate\Database\Eloquent\Relations\BelongsTo
|
|
{
|
|
return $this->belongsTo(Ticket::class);
|
|
}
|
|
}
|