~sircmpwn/names.sr.ht

101e83355d56d5ab8b3166b7af0b2e8304dfe0d9 — Drew DeVault 1 year, 9 months ago 971a040
Add some more gTLD-specific tables
1 files changed, 130 insertions(+), 7 deletions(-)

M names/types/gtld_specific.py
M names/types/gtld_specific.py => names/types/gtld_specific.py +130 -7
@@ 18,6 18,13 @@ class ExtraDataMixin:
    def user(cls):
        return sa.orm.relationship('User')

# Common to many TLDs
class RegistrantType(enum.Enum):
    individual = "individual"
    """Individual"""
    organization = "organization"
    """Organization"""

### .aero
class AeroExtraData(Base, ExtraDataMixin):
    """


@@ 175,12 182,6 @@ class AuExtraData(Base, ExtraDataMixin):
    """

### .cl
class ClRegistrantType(enum.Enum):
    individual = "individual"
    """Individual"""
    organization = "organization"
    """Organization"""

class ClExtraData(Base, ExtraDataMixin):
    __tablename__ = "cl_extra_data"



@@ 188,12 189,134 @@ class ClExtraData(Base, ExtraDataMixin):
    """The number of the individual's identity card."""

    registrant_type = sa.Column(
            sau.ChoiceType(ClRegistrantType), nullable=False)
            sau.ChoiceType(RegistrantType, impl=sa.Unicode), nullable=False)
    """The entity type of registrant."""

    registrant_vat_id = sa.Column(sa.Unicode) # required if type = organization
    """Value Added Tax registration number."""

### .pt
### .com.ar
### .com.pt
class PtExtraData(Base, ExtraDataMixin):
    __tablename__ = "pt_extra_data"

    id_card_number = sa.Column(sa.Unicode) # required if type = individual
    """The number of the individual's identity card."""

    registrant_type = sa.Column(
            sau.ChoiceType(RegistrantType, impl=sa.Unicode), nullable=False)
    """The entity type of registrant."""

    tax_number = sa.Column(sa.Unicode, nullable=False)
    """The number used for tax purposes."""

### .com.br
class ComBrExtraData(Base, ExtraDataMixin):
    __tablename__ = "com_br_extra_data"

    br_register_number = sa.Column(sa.Unicode, nullable=False)
    """
    The Brazilian legal identifier.

    For organizations, this is the SNPJ (Business Identifier/Cadastro Nacional
    de Pessoa Juridica). For individuals, this is the CPF (Individual Tax
    Number/Cadastro de Pessoa Fisica).
    """

### .coop
class CoopExtraData(Base, ExtraDataMixin):
    """
    Registration of .COOP domains is restricted to cooperatives and related
    organizations.
    """
    __tablename__ = "coop_extra_data"

    # TODO: We need to figure out how to obtain one of these
    coop_verification_code = sa.Column(sa.Unicode, nullable=False)
    """
    The coop verification code (CVC) is issued by dotCoop, and proves that the
    registrant is eligible to register the domain name.
    """

### .es
class EsIdType(enum.Enum):
    other = "other"
    nie = "NIE"
    nif = "NIF"

class EsExtraData(Base, ExtraDataMixin):
    """
    Registration of a .es domain requires validation by identification number
    (in most cases an NIF or NIF number).
    """
    __tablename__ = "es_extra_data"

    es_id_type = sa.Column(sau.ChoiceType(
        EsIdType, impl=sa.Unicode), nullable=False)
    """ID Type"""

    es_id_number = sa.Column(sa.Unicode) # required if NIE or NIF
    """ID Number"""

### .eu
class EuCitizenship(enum.Enum):
    AT = "AT"
    BE = "BE"
    BG = "BG"
    CY = "CY"
    CZ = "CZ"
    DE = "DE"
    DK = "DK"
    EE = "EE"
    ES = "ES"
    FI = "FI"
    FR = "FR"
    GB = "GB"
    GR = "GR"
    HR = "HR"
    HU = "HU"
    IE = "IE"
    IT = "IT"
    LT = "LT"
    LU = "LU"
    LV = "LV"
    MT = "MT"
    NL = "NL"
    PL = "PL"
    PT = "PT"
    RO = "RO"
    SE = "SE"
    SI = "SI"
    SK = "SK"

class EuExtraData(Base, ExtraDataMixin):
    """Registration of .eu domains is limited to EU citizens only."""
    __tablename__ = "eu_extra_data"

    country_of_citizenship = sa.Column(sau.ChoiceType(
        EuCitizenship, impl=sa.Unicode), nullable=False)
    """Country of citizenship"""

### .de
class DeExtraData(Base, ExtraDataMixin):
    __tablename__ = "de_extra_data"

    registrant_type = sa.Column(sau.ChoiceType(
        RegistrantType, impl=sa.Unicode), nullable=False)
    """The entity type of registrant."""

### .dk
class DkExtraData(Base, ExtraDataMixin):
    __tablename__ = "dk_extra_data"

    registrant_type = sa.Column(sau.ChoiceType(
        RegistrantType, impl=sa.Unicode), nullable=False)
    """The entity type of registrant."""

    registrant_vat_id = sa.Column(sa.Unicode) # required for organizations
    """Value Added Tax registration number."""

### .it
class ItEntityType(enum.Enum):
    italian_and_foreign_national_persons = 1