from django.db import models


class City(models.Model):
    name = models.CharField(max_length=255)
    slug = models.CharField(max_length=255)
    enabled = models.BooleanField()

    def __str__(self):
        return self.name


class Association(models.Model):
    STATES = (
        ('dronken', 'Dronken'),
        ('nuchter', 'Nuchter'),
        ('brak', 'Brak')
    )

    name = models.CharField(max_length=255)
    short_name = models.CharField(max_length=255)
    slug = models.CharField(max_length=255)
    intern = models.CharField(max_length=255, blank=True, null=True)
    state = models.CharField(choices=STATES, max_length=255)
    city = models.ForeignKey(to=City, on_delete=models.SET_NULL, blank=True, null=True)
    has_intern = models.BooleanField()
    enabled = models.BooleanField()

    def __str__(self):
        return self.name
