# Generated by Django 5.1.1 on 2024-10-08 13:52

import django_eventspipe.utils
import django_eventspipe.validators
from django.conf import settings
from django.db import migrations, models


class Migration(migrations.Migration):

    dependencies = [
        ('django_eventspipe', '0002_remove_artifact_name_remove_artifact_timestamp_and_more'),
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='EventSchedule',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('event', models.JSONField(default=dict)),
                ('minute', models.CharField(default='*', help_text='Cron Minutes to Run. Use "*" for "all". (Example: "0,30")', max_length=240, validators=[django_eventspipe.validators.minute_validator], verbose_name='Minute(s)')),
                ('hour', models.CharField(default='*', help_text='Cron Hours to Run. Use "*" for "all". (Example: "8,20")', max_length=96, validators=[django_eventspipe.validators.hour_validator], verbose_name='Hour(s)')),
                ('day_of_month', models.CharField(default='*', help_text='Cron Days Of The Month to Run. Use "*" for "all". (Example: "1,15")', max_length=124, validators=[django_eventspipe.validators.day_of_month_validator], verbose_name='Day(s) Of The Month')),
                ('month_of_year', models.CharField(default='*', help_text='Cron Months (1-12) Of The Year to Run. Use "*" for "all". (Example: "1,12")', max_length=64, validators=[django_eventspipe.validators.month_of_year_validator], verbose_name='Month(s) Of The Year')),
                ('day_of_week', models.CharField(default='*', help_text='Cron Days Of The Week to Run. Use "*" for "all", Sunday is 0 or 7, Monday is 1. (Example: "0,5")', max_length=64, validators=[django_eventspipe.validators.day_of_week_validator], verbose_name='Day(s) Of The Week')),
                ('user', models.ForeignKey(on_delete=models.SET(django_eventspipe.utils.get_sentinel_user), to=settings.AUTH_USER_MODEL)),
            ],
        ),
    ]
