feat: AfterSales CRM - SOP compliant real-estate customer care system
- Departments + cross-department transfer workflow - Role-based closing (staff→resolved, manager→closed) with proof_of_resolution - Private file storage with collection system + temporary signed URLs - Dashboard: resolved tickets table, stats, handler performance bar chart - Spatie RBAC (admin/manager/staff) - Notifications: TicketTransferred, TicketClosed (database + mail) - Pest tests: 8 tests, 21 assertions - Docker production-ready (Dockerfile + compose + entrypoint)
This commit is contained in:
36
app/Models/FeedbackAttachment.php
Normal file
36
app/Models/FeedbackAttachment.php
Normal file
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Attributes\Fillable;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
|
||||
#[Fillable(['uuid', 'feedback_id', 'feedback_interaction_id', 'user_id', 'name', 'path', 'disk', 'collection', 'mime_type', 'size'])]
|
||||
class FeedbackAttachment extends Model
|
||||
{
|
||||
public function feedback(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(Feedback::class);
|
||||
}
|
||||
|
||||
public function interaction(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(FeedbackInteraction::class, 'feedback_interaction_id');
|
||||
}
|
||||
|
||||
public function user(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(User::class);
|
||||
}
|
||||
|
||||
public function scopeByCollection($query, string $collection)
|
||||
{
|
||||
return $query->where('collection', $collection);
|
||||
}
|
||||
|
||||
public function scopeByDisk($query, string $disk)
|
||||
{
|
||||
return $query->where('disk', $disk);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user