# Generated by Django 5.2.5 on 2025-08-18 18:45

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


class Migration(migrations.Migration):

    dependencies = [
        ('django_scrapyd_manager', '0001_initial'),
    ]

    operations = [
        migrations.AlterUniqueTogether(
            name='project',
            unique_together=set(),
        ),
        migrations.AlterField(
            model_name='project',
            name='create_time',
            field=models.DateTimeField(default=datetime.datetime.now, verbose_name='创建时间'),
        ),
        migrations.CreateModel(
            name='Job',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('job_id', models.CharField(max_length=255, verbose_name='任务ID')),
                ('start_time', models.DateTimeField()),
                ('end_time', models.DateTimeField(blank=True, null=True)),
                ('log_url', models.CharField(blank=True, max_length=255, null=True)),
                ('items_url', models.CharField(blank=True, max_length=255, null=True)),
                ('status', models.CharField(max_length=20, verbose_name='状态')),
                ('pid', models.IntegerField(blank=True, null=True, verbose_name='进程ID')),
                ('create_time', models.DateTimeField(default=datetime.datetime.now, verbose_name='创建时间')),
                ('update_time', models.DateTimeField(auto_now=True, verbose_name='更新时间')),
                ('spider', models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, to='django_scrapyd_manager.spider', verbose_name='爬虫')),
            ],
            options={
                'verbose_name': 'Scrapy Job',
                'verbose_name_plural': 'Scrapy Job',
                'db_table': 'scrapy_job',
            },
        ),
        migrations.CreateModel(
            name='SpiderGroup',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=255, unique=True, verbose_name='任务组名称')),
                ('description', models.TextField(blank=True, null=True, verbose_name='任务组描述')),
                ('create_time', models.DateTimeField(default=datetime.datetime.now, verbose_name='创建时间')),
                ('update_time', models.DateTimeField(auto_now=True, verbose_name='更新时间')),
                ('spiders', models.ManyToManyField(to='django_scrapyd_manager.spider', verbose_name='爬虫')),
            ],
            options={
                'verbose_name': 'Scrapy Spider Group',
                'verbose_name_plural': 'Scrapy Spider Group',
                'db_table': 'scrapy_spider_group',
            },
        ),
    ]
