# Generated by Django 5.1.6 on 2025-05-30 02:46

import dj_banner.models
import django.db.models.deletion
from django.db import migrations, models


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='BannerStyle',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=100)),
                ('align_vertical', models.CharField(choices=[('right', 'Right'), ('center', 'Center'), ('left', 'Left')], max_length=15)),
                ('align_horizontal', models.CharField(choices=[('top', 'Top'), ('middle', 'Middle'), ('bottom', 'Bottom')], max_length=15)),
                ('width', models.CharField(default='auto', help_text='You can set "auto" or percentage like "50%" or pixle like "200px" value', max_length=10)),
                ('height', models.CharField(default='auto', help_text='You can set "auto" or percentage like "50%" or pixle like "200px" value', max_length=10)),
                ('width_smallsize', models.CharField(default='auto', help_text='You can set "auto" or percentage like "50%" or pixle like "200px" value', max_length=10)),
                ('height_smallsize', models.CharField(default='auto', help_text='You can set "auto" or percentage like "50%" or pixle like "200px" value', max_length=10)),
                ('image_fit', models.CharField(choices=[('unset', 'Unset'), ('cover', 'Cover'), ('contain', 'Contain')], default='unset', max_length=10)),
            ],
        ),
        migrations.CreateModel(
            name='Page',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=100)),
                ('url', models.TextField(help_text='Enter the address of the page where you want the banner to be displayed - (without domain address)')),
            ],
        ),
        migrations.CreateModel(
            name='Banner',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=100)),
                ('image', models.ImageField(blank=True, null=True, upload_to=dj_banner.models.upload_image_banner)),
                ('image_url', models.URLField(blank=True, help_text='You can set image url instead image', null=True)),
                ('href', models.URLField(help_text='When it is clicked , it will be redirect to this address')),
                ('count_click', models.IntegerField(default=0)),
                ('style', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='dj_banner.bannerstyle')),
                ('pages', models.ManyToManyField(to='dj_banner.page')),
            ],
        ),
    ]
