Skip to content

Commit

Permalink
fix: change params id by entity
Browse files Browse the repository at this point in the history
  • Loading branch information
LimberHope committed May 9, 2024
1 parent b2ea460 commit 452cd4a
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 9 deletions.
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<?php

namespace App\Models\V2;
namespace App\Models\V2\AuditAttachment;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;
use App\Models\V2\AuditStatus;
use App\Models\V2\AuditStatus\AuditStatus;

class AuditAttachment extends Model
{
Expand All @@ -16,11 +16,13 @@ class AuditAttachment extends Model

protected $fillable = [
'id',
'entity_uuid',
'status',
'comment',
'attachment_url',
'attachment',
'date_created',
'created_by',
];

public function auditStatus()
{
return $this->belongsTo(AuditStatus::class, 'id', 'id');
}
}
8 changes: 6 additions & 2 deletions app/Models/V2/AuditStatus/AuditStatus.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;
// use App\Models\V2\Audits\AuditAttachment;
// use App\Models\V2\AuditStatus\AuditAttachment;
use App\Models\V2\AuditAttachment\AuditAttachment;

class AuditStatus extends Model
{
Expand All @@ -24,4 +23,9 @@ class AuditStatus extends Model
'date_created',
'created_by',
];

public function auditAttachment()
{
return $this->hasMany(AuditAttachment::class, 'id', 'id');
}
}
2 changes: 1 addition & 1 deletion resources/docs/swagger-v2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94522,7 +94522,7 @@ paths:
- V2 Audits Status
parameters:
- in: query
name: id
name: entity
type: string
description: Optional.
responses:
Expand Down

0 comments on commit 452cd4a

Please sign in to comment.