from django.db import models




class SiteSettings(models.Model):
    site_name = models.CharField(max_length=200 , verbose_name='Site Name')
    site_url = models.CharField(max_length=200 , verbose_name='Site URL')
    site_address = models.CharField(max_length=300 , verbose_name='Site Address')
    site_phone = models.CharField(max_length=100 , null=True , blank=True , verbose_name='Site Phone')
    site_fax = models.CharField(max_length=200 , null=True , blank=True , verbose_name='Site Fax')
    site_email = models.EmailField(max_length=200 , null=True , blank=True , verbose_name='Site Email')
    about_us_text = models.TextField(verbose_name='About Us Text')
    site_copy_right = models.TextField(verbose_name='Copyright Text')
    site_logo = models.ImageField(upload_to='images/site-setting/' , verbose_name='Site Logo')
    is_main_setting = models.BooleanField(verbose_name='Site Main Settings')

    def __str__(self) -> str:
        super(SiteSettings , self).__str__()
        return self.site_name

    class Meta:
        verbose_name = 'Site Setting'
        verbose_name_plural = 'Site Settings'
        
        
        
        
        
class FooterLinkBox(models.Model):
    title = models.CharField(max_length=200 , verbose_name='Title')
    
    def __str__(self) -> str:
        super(FooterLinkBox , self).__str__()
        return self.title
    
    class Meta:
        verbose_name = 'Footer Link Setting'
        verbose_name_plural = 'Footer Link Settings'
        
        
 
        
        
class FooterLink(models.Model):
    title = models.CharField(max_length=200 , verbose_name='Title')
    url = models.URLField(max_length=500 , verbose_name='Links')
    footer_link_box = models.ForeignKey(to=FooterLinkBox , verbose_name='Category' , on_delete=models.CASCADE)
    
    def __str__(self) -> str:
        super(FooterLink , self).__str__()
        return self.title
    
    class Meta:
        verbose_name = 'Footer Link'
        verbose_name_plural = 'Footer Links'
        
        
        
        
        
class Slider(models.Model):
    title = models.CharField(max_length=200 , verbose_name='Title')
    description = models.TextField(verbose_name='Slider Description')
    url_title = models.CharField(max_length=200 , verbose_name='URL Title')
    url = models.URLField(max_length=200 , verbose_name='URL Address')
    image = models.ImageField(upload_to='images/sliders' , verbose_name='Slider Image')
    is_active = models.BooleanField(default=False , verbose_name='Active / Inactive')
    
    def __str__(self) -> str:
        super(Slider , self).__str__()
        return self.title
    
    class Meta:
        verbose_name = 'Slider'
        verbose_name_plural = 'Sliders'
[(7, 'django.db.models.CharField', 'models.CharField', ([], {'max_length': '(200)', 'verbose_name': '"""Site Name"""'}), False, 'from django.db import models\n'), (8, 'django.db.models.CharField', 'models.CharField', ([], {'max_length': '(200)', 'verbose_name': '"""Site URL"""'}), False, 'from django.db import models\n'), (9, 'django.db.models.CharField', 'models.CharField', ([], {'max_length': '(300)', 'verbose_name': '"""Site Address"""'}), False, 'from django.db import models\n'), (10, 'django.db.models.CharField', 'models.CharField', ([], {'max_length': '(100)', 'null': '(True)', 'blank': '(True)', 'verbose_name': '"""Site Phone"""'}), False, 'from django.db import models\n'), (11, 'django.db.models.CharField', 'models.CharField', ([], {'max_length': '(200)', 'null': '(True)', 'blank': '(True)', 'verbose_name': '"""Site Fax"""'}), False, 'from django.db import models\n'), (12, 'django.db.models.EmailField', 'models.EmailField', ([], {'max_length': '(200)', 'null': '(True)', 'blank': '(True)', 'verbose_name': '"""Site Email"""'}), False, 'from django.db import models\n'), (13, 'django.db.models.TextField', 'models.TextField', ([], {'verbose_name': '"""About Us Text"""'}), False, 'from django.db import models\n'), (14, 'django.db.models.TextField', 'models.TextField', ([], {'verbose_name': '"""Copyright Text"""'}), False, 'from django.db import models\n'), (15, 'django.db.models.ImageField', 'models.ImageField', ([], {'upload_to': '"""images/site-setting/"""', 'verbose_name': '"""Site Logo"""'}), False, 'from django.db import models\n'), (16, 'django.db.models.BooleanField', 'models.BooleanField', ([], {'verbose_name': '"""Site Main Settings"""'}), False, 'from django.db import models\n'), (31, 'django.db.models.CharField', 'models.CharField', ([], {'max_length': '(200)', 'verbose_name': '"""Title"""'}), False, 'from django.db import models\n'), (46, 'django.db.models.CharField', 'models.CharField', ([], {'max_length': '(200)', 'verbose_name': '"""Title"""'}), False, 'from django.db import models\n'), (47, 'django.db.models.URLField', 'models.URLField', ([], {'max_length': '(500)', 'verbose_name': '"""Links"""'}), False, 'from django.db import models\n'), (48, 'django.db.models.ForeignKey', 'models.ForeignKey', ([], {'to': 'FooterLinkBox', 'verbose_name': '"""Category"""', 'on_delete': 'models.CASCADE'}), False, 'from django.db import models\n'), (63, 'django.db.models.CharField', 'models.CharField', ([], {'max_length': '(200)', 'verbose_name': '"""Title"""'}), False, 'from django.db import models\n'), (64, 'django.db.models.TextField', 'models.TextField', ([], {'verbose_name': '"""Slider Description"""'}), False, 'from django.db import models\n'), (65, 'django.db.models.CharField', 'models.CharField', ([], {'max_length': '(200)', 'verbose_name': '"""URL Title"""'}), False, 'from django.db import models\n'), (66, 'django.db.models.URLField', 'models.URLField', ([], {'max_length': '(200)', 'verbose_name': '"""URL Address"""'}), False, 'from django.db import models\n'), (67, 'django.db.models.ImageField', 'models.ImageField', ([], {'upload_to': '"""images/sliders"""', 'verbose_name': '"""Slider Image"""'}), False, 'from django.db import models\n'), (68, 'django.db.models.BooleanField', 'models.BooleanField', ([], {'default': '(False)', 'verbose_name': '"""Active / Inactive"""'}), False, 'from django.db import models\n')]