from django.utils.translation import gettext_lazy

from assets.models.assets import Asset
from devices.models.device import Device
from django.db import models


class ArmaIndustrialFirewall(Device):
    key = models.CharField(max_length=256,
                           blank=False,
                           default='',
                           verbose_name=gettext_lazy('Key'),
                           help_text=gettext_lazy('API key for device'))
    secret = models.CharField(max_length=256,
                              blank=False,
                              default='',
                              verbose_name=gettext_lazy('Secret'),
                              help_text=gettext_lazy('Secret value for API key'))
    comment = models.CharField(max_length=256,
                               blank=True,
                               default='',
                               verbose_name=gettext_lazy('Comment'),
                               help_text=gettext_lazy('Additional notes about device'))
    website = models.CharField(max_length=256,
                               help_text=gettext_lazy('ArmaIndustrialFirewall website'),
                               default=gettext_lazy('Unknown'))
    version = models.CharField(max_length=128,
                               help_text=gettext_lazy('ArmaIndustrialFirewall version'),
                               default=gettext_lazy('Unknown'))
    remote_name = models.CharField(max_length=128,
                            help_text=gettext_lazy('ArmaIndustrialFirewall name'),
                            default=gettext_lazy('Unknown'))
    identification_number = models.CharField(max_length=128,
                                             help_text=gettext_lazy('ArmaIndustrialFirewall ID'),
                                             default=gettext_lazy('Unknown'))
    hash_number = models.CharField(max_length=256,
                                   help_text=gettext_lazy('ArmaIndustrialFirewall hash'),
                                   default=gettext_lazy('Unknown'))
    flavour = models.CharField(max_length=128,
                               help_text=gettext_lazy('ArmaIndustrialFirewall flavour'),
                               default=gettext_lazy('Unknown'))
    email = models.CharField(max_length=256,
                             help_text=gettext_lazy('ArmaIndustrialFirewall email'),
                             default=gettext_lazy('Unknown'))
    copyright_years = models.CharField(max_length=128,
                                       help_text=gettext_lazy('ArmaIndustrialFirewall copyright years'),
                                       default=gettext_lazy('Unknown'))
    copyright_url = models.CharField(max_length=256,
                                     help_text=gettext_lazy('ArmaIndustrialFirewall copyright url'),
                                     default=gettext_lazy('Unknown'))
    copyright_owner = models.CharField(max_length=128,
                                       help_text=gettext_lazy('ArmaIndustrialFirewall copyright owner'),
                                       default=gettext_lazy('Unknown'))
    architecture = models.CharField(max_length=128,
                                    help_text=gettext_lazy('ArmaIndustrialFirewall architecture'),
                                    default=gettext_lazy('Unknown'))
    abi = models.CharField(max_length=128,
                           help_text=gettext_lazy('ArmaIndustrialFirewall abi'),
                           default=gettext_lazy('Unknown'))

    def __str__(self):
        return f"{self.name} - {self.type}"
