from django.db import models
from addons.models import City
# Create your models here.
class Location(models.Model):
    city = models.ForeignKey(City, 
                            related_name='LOCATIONCITY', 
                            on_delete=models.CASCADE, 
                            default=None, 
                            verbose_name="City Name",
                            help_text=f"Type: Int, values: Select City Name.")
    name = models.CharField(max_length=96,
                            default=None,
                            help_text=f"Type: String, Values: Enter Location Name.")
    slug = models.SlugField(max_length=96,
                            unique=True,
                            blank=True, 
                            null=True,
                            default=None,
                            help_text=f"Type: String, Values: Enter Location Slug.")
    title = models.CharField(max_length=96, 
                                    blank=True, 
                                    null=True,
                                    help_text=f"Type: String, Values: Enter Location Meta Title.")
    description = models.TextField(max_length=180, 
                                blank=True, 
                                null=True,
                                help_text=f"Type: String, Values: Enter Location Meta Description.")
    keyword = models.CharField(max_length=180, 
                                blank=True, 
                                null=True,
                                help_text=f"Type: String, Values: Enter Location Meta Keywords.")
    created_at = models.DateTimeField(auto_now_add=True)
    updated_at = models.DateTimeField(auto_now=True)

    def __str__(self):
        return self.name
    
    class Meta:
        verbose_name_plural = 'Location'