from django.db import models
from django.utils.translation import ugettext_lazy as _

from ..docbow.models import FileType

class PloneFileType(models.Model):
    filetype = models.OneToOneField(FileType, verbose_name=_('Document type'))
    plone_portal_type = models.CharField(max_length=64)

    class Meta:
        # backward compatibility
        db_table = "plone_plonefiletype"

class TabellioDocType(models.Model):
    filetype = models.OneToOneField(FileType, verbose_name=_('Document type'))
    tabellio_doc_type = models.CharField(max_length=64, verbose_name=_('Tabellio doc type'))

    class Meta:
        verbose_name = _('Tabellio doc type mapping')
        verbose_name_plural = _('Tabellio doc type mappings')
