HEX
Server: LiteSpeed
System: Linux houston.panomity.com 6.8.0-100-generic #100-Ubuntu SMP PREEMPT_DYNAMIC Tue Jan 13 16:40:06 UTC 2026 x86_64
User: nudepix (1011)
PHP: 7.4.33
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Upload Files
File: //usr/local/CyberCP/dns/models.py

from django.db import models
from loginSystem.models import Administrator


class Domains(models.Model):
    admin = models.ForeignKey(Administrator,on_delete=models.CASCADE, default=1, null=True)
    name = models.CharField(unique=True, max_length=255)
    master = models.CharField(max_length=128, blank=True, null=True)
    last_check = models.IntegerField(blank=True, null=True)
    # PDNS 4.7+ widened `type` to VARCHAR(8) to fit catalog-zone identifiers.
    type = models.CharField(max_length=8)
    notified_serial = models.PositiveIntegerField(blank=True, null=True)
    account = models.CharField(max_length=40, blank=True, null=True)
    # PDNS 4.7+ catalog-zones support. The actual ALTER TABLE for legacy
    # installs is performed by plogical/pdnsSchemaMigration.py — keep these
    # fields here so Django queries that touch them (or Django's own
    # makemigrations/migrate on fresh installs) stay in sync with the schema
    # PDNS expects.
    catalog = models.CharField(max_length=255, blank=True, null=True)
    options = models.TextField(blank=True, null=True)

    class Meta:
        db_table = 'domains'


class Records(models.Model):
    domainOwner = models.ForeignKey(Domains, on_delete=models.CASCADE, null=True)
    id = models.BigAutoField(primary_key=True)
    domain_id = models.IntegerField(blank=True, null=True)
    name = models.CharField(max_length=255, blank=True, null=True)
    type = models.CharField(max_length=10, blank=True, null=True)
    content = models.CharField(max_length=1000, blank=True, null=True)
    ttl = models.IntegerField(blank=True, null=True)
    prio = models.IntegerField(blank=True, null=True)
    change_date = models.IntegerField(blank=True, null=True)
    disabled = models.IntegerField(blank=True, null=True)
    ordername = models.CharField(max_length=255, blank=True, null=True)
    auth = models.IntegerField(blank=True, null=True)

    class Meta:
        db_table = 'records'


class Comments(models.Model):
    domain_id = models.IntegerField()
    name = models.CharField(max_length=255)
    type = models.CharField(max_length=10)
    modified_at = models.IntegerField()
    account = models.CharField(max_length=40)
    comment = models.TextField()

    class Meta:
        db_table = 'comments'


class Cryptokeys(models.Model):
    domain_id = models.IntegerField()
    flags = models.IntegerField()
    active = models.IntegerField(blank=True, null=True)
    # PDNS 4.3+ requires `published`. plogical/pdnsSchemaMigration.py
    # backfills this column on legacy installs.
    published = models.BooleanField(default=True, blank=True, null=True)
    content = models.TextField(blank=True, null=True)

    class Meta:
        db_table = 'cryptokeys'


class Domainmetadata(models.Model):
    domain_id = models.IntegerField()
    kind = models.CharField(max_length=32, blank=True, null=True)
    content = models.TextField(blank=True, null=True)

    class Meta:
        db_table = 'domainmetadata'


class Supermasters(models.Model):
    ip = models.CharField(primary_key=True, max_length=64)
    nameserver = models.CharField(max_length=255)
    account = models.CharField(max_length=40)

    class Meta:
        db_table = 'supermasters'
        unique_together = (('ip', 'nameserver'),)


class Tsigkeys(models.Model):
    name = models.CharField(max_length=255, blank=True, null=True)
    algorithm = models.CharField(max_length=50, blank=True, null=True)
    secret = models.CharField(max_length=255, blank=True, null=True)

    class Meta:
        db_table = 'tsigkeys'
        unique_together = (('name', 'algorithm'),)