Files
coolify/app/Models/ManagedDnsRecord.php
T
Andras Bacsai ab3b3926aa feat: add database import API and Cloudflare DNS management
Queue database imports from upload, S3, or server paths via REST, and
manage Cloudflare DNS records from integration tokens and domain UIs.
2026-09-09 11:14:22 +02:00

33 lines
788 B
PHP

<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Database\Eloquent\Relations\MorphTo;
class ManagedDnsRecord extends BaseModel
{
use HasFactory;
protected $fillable = [
'team_id', 'integration_token_id', 'dns_provider_zone_id', 'resource_type', 'resource_id',
'provider_record_id', 'type', 'name', 'content',
];
public function zone(): BelongsTo
{
return $this->belongsTo(DnsProviderZone::class, 'dns_provider_zone_id');
}
public function integrationToken(): BelongsTo
{
return $this->belongsTo(IntegrationToken::class);
}
public function resource(): MorphTo
{
return $this->morphTo();
}
}