# Path: dnsforever/config.py



from sqlalchemy import create_engine
from sqlalchemy import Column, Integer, String, Unicode, Boolean, DateTime, \
    UnicodeText
from sqlalchemy import ForeignKey
from sqlalchemy.orm import sessionmaker, validates, relationship
from sqlalchemy.sql import functions
from sqlalchemy.ext.declarative import declarative_base
from dnsforever.config import database_url, webforwarding_domain
import re
import unittest
import string
import random
    __mapper_args__ = {
        'polymorphic_identity': 'servicenameserver',
    }

    def __init__(self, domain, nameserver, ttl=3600):
        self.domain = domain
        self.name = ''
        self.rdata = nameserver.ip
        self.ttl = ttl
        self.cls = 0
        self.type = u'NS'
        self.nameserver = nameserver

    id = Column(Integer, ForeignKey('record.id'), primary_key=True)

    nameserver_id = Column(Integer, ForeignKey('nameserver.id'), nullable=False)
    nameserver = relationship(NameServer)


class RecordDDNS_A(Record):
    __tablename__ = 'record_ddns_a'

    __mapper_args__ = {
        'polymorphic_identity': 'ddns_a',
    }

    def __init__(self, domain, name, ip, memo, ttl=300):
        self.domain = domain
        self.name = name
        self.rdata = ip

# Path: dnsforever/config.py



# Path: dnsforever/models.py
from sqlalchemy import create_engine
from sqlalchemy import Column, Integer, String, Unicode, Boolean, DateTime, \
    UnicodeText
from sqlalchemy import ForeignKey
from sqlalchemy.orm import sessionmaker, validates, relationship
from sqlalchemy.sql import functions
from sqlalchemy.ext.declarative import declarative_base
from dnsforever.config import database_url, webforwarding_domain
import re
import unittest
import string
import random

    __mapper_args__ = {
        'polymorphic_identity': 'servicenameserver',
    }

    def __init__(self, domain, nameserver, ttl=3600):
        self.domain = domain
        self.name = ''
        self.rdata = nameserver.ip
        self.ttl = ttl
        self.cls = 0
        self.type = u'NS'
        self.nameserver = nameserver

    id = Column(Integer, ForeignKey('record.id'), primary_key=True)

    nameserver_id = Column(Integer, ForeignKey('nameserver.id'), nullable=False)
    nameserver = relationship(NameServer)


class RecordDDNS_A(Record):
    __tablename__ = 'record_ddns_a'

    __mapper_args__ = {
        'polymorphic_identity': 'ddns_a',
    }

    def __init__(self, domain, name, ip, memo, ttl=300):
        self.domain = domain
        self.name = name
        self.rdata = ip

        self.ttl = ttl