# Generated by Django 4.2.4 on 2023-11-04 13:33

from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('contenttypes', '0002_remove_content_type_name'),
        ('auth', '0012_alter_user_first_name_max_length'),
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='BaykeADPosition',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('add_date', models.DateTimeField(auto_now_add=True, verbose_name='添加时间')),
                ('pub_date', models.DateTimeField(auto_now=True, verbose_name='修改时间')),
                ('is_delete', models.BooleanField(default=False, editable=False, verbose_name='删除标记')),
                ('name', models.CharField(max_length=50, verbose_name='名称')),
                ('slug', models.SlugField(unique=True, verbose_name='slug')),
                ('desc', models.CharField(blank=True, default='', max_length=150, verbose_name='说明')),
            ],
            options={
                'verbose_name': '广告位',
                'verbose_name_plural': '广告位',
                'ordering': ['-add_date'],
            },
        ),
        migrations.CreateModel(
            name='BaykeSiteMenus',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('add_date', models.DateTimeField(auto_now_add=True, verbose_name='添加时间')),
                ('pub_date', models.DateTimeField(auto_now=True, verbose_name='修改时间')),
                ('is_delete', models.BooleanField(default=False, editable=False, verbose_name='删除标记')),
                ('name', models.CharField(max_length=50, unique=True, verbose_name='名称')),
                ('icon', models.CharField(blank=True, default='', max_length=50, verbose_name='图标')),
                ('parent', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='system.baykesitemenus')),
                ('permission', models.OneToOneField(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='auth.permission', verbose_name='权限')),
            ],
            options={
                'verbose_name': 'SiteMenus',
                'verbose_name_plural': 'SiteMenus',
                'ordering': ['-add_date'],
            },
        ),
        migrations.CreateModel(
            name='BaykeComment',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('add_date', models.DateTimeField(auto_now_add=True, verbose_name='添加时间')),
                ('pub_date', models.DateTimeField(auto_now=True, verbose_name='修改时间')),
                ('is_delete', models.BooleanField(default=False, editable=False, verbose_name='删除标记')),
                ('object_id', models.PositiveIntegerField(blank=True, null=True)),
                ('tag', models.CharField(blank=True, default='', max_length=200, verbose_name='标记')),
                ('content', models.CharField(max_length=200, verbose_name='评论')),
                ('score', models.PositiveSmallIntegerField(choices=[(1, '差评'), (3, '中评'), (5, '好评')], default=5, verbose_name='评价')),
                ('reply', models.CharField(blank=True, default='', max_length=200, verbose_name='回复内容')),
                ('content_type', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='contenttypes.contenttype')),
                ('owner', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL, verbose_name='用户')),
            ],
            options={
                'verbose_name': '评论',
                'verbose_name_plural': '评论',
                'ordering': ['-add_date'],
                'permissions': [('reply_to_comments', 'Reply to comments')],
            },
        ),
        migrations.CreateModel(
            name='BaykeADSpace',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('add_date', models.DateTimeField(auto_now_add=True, verbose_name='添加时间')),
                ('pub_date', models.DateTimeField(auto_now=True, verbose_name='修改时间')),
                ('is_delete', models.BooleanField(default=False, editable=False, verbose_name='删除标记')),
                ('name', models.CharField(max_length=50, verbose_name='名称')),
                ('slug', models.SlugField(unique=True, verbose_name='slug')),
                ('space', models.CharField(choices=[('text', '文字广告'), ('img', '图片广告'), ('html', '自定义广告')], default='img', max_length=10, verbose_name='类型')),
                ('remark', models.CharField(blank=True, default='', max_length=150, verbose_name='备注')),
                ('img', models.ImageField(blank=True, null=True, upload_to='common/ad', verbose_name='图片广告')),
                ('text', models.CharField(blank=True, default='', max_length=150, verbose_name='文字广告')),
                ('html', models.TextField(blank=True, default='', verbose_name='自定义广告')),
                ('target', models.URLField(blank=True, default='', verbose_name='跳转地址')),
                ('sort', models.PositiveSmallIntegerField(default=1, verbose_name='排序')),
                ('status', models.BooleanField(default=True, verbose_name='状态')),
                ('position', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='system.baykeadposition', verbose_name='广告位')),
            ],
            options={
                'verbose_name': '广告内容',
                'verbose_name_plural': '广告内容',
                'ordering': ['sort'],
            },
        ),
    ]
