diff --git a/app/Models/V2/AuditStatus/AuditAttachment.php b/app/Models/V2/AuditAttachment/AuditAttachment.php similarity index 62% rename from app/Models/V2/AuditStatus/AuditAttachment.php rename to app/Models/V2/AuditAttachment/AuditAttachment.php index e25cccf4d..954222c31 100644 --- a/app/Models/V2/AuditStatus/AuditAttachment.php +++ b/app/Models/V2/AuditAttachment/AuditAttachment.php @@ -1,11 +1,11 @@ belongsTo(AuditStatus::class, 'id', 'id'); + } } diff --git a/app/Models/V2/AuditStatus/AuditStatus.php b/app/Models/V2/AuditStatus/AuditStatus.php index b009cfe92..f747a54c4 100644 --- a/app/Models/V2/AuditStatus/AuditStatus.php +++ b/app/Models/V2/AuditStatus/AuditStatus.php @@ -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 { @@ -24,4 +23,9 @@ class AuditStatus extends Model 'date_created', 'created_by', ]; + + public function auditAttachment() + { + return $this->hasMany(AuditAttachment::class, 'id', 'id'); + } } diff --git a/resources/docs/swagger-v2.yml b/resources/docs/swagger-v2.yml index c688f89a4..f36d06ff0 100644 --- a/resources/docs/swagger-v2.yml +++ b/resources/docs/swagger-v2.yml @@ -94522,7 +94522,7 @@ paths: - V2 Audits Status parameters: - in: query - name: id + name: entity type: string description: Optional. responses: