# Generated by Django 3.0.5 on 2021-03-05 22:13

from django.db import (
    migrations,
    models,
)
from django.db.models import deletion
from djongo import models as djongo_models

import antiphona.validators


class Migration(migrations.Migration):

    initial = True

    dependencies: list = []

    operations = [
        migrations.CreateModel(
            name='Antiphona',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('text', djongo_models.JSONField(default={}, validators=[
                    antiphona.validators.TypeValidator(dict),
                    antiphona.validators.KeysTypeValidator(str),
                    antiphona.validators.ValuesTypeValidator(str),
                    antiphona.validators.ValidKeyValidator(
                        valid_keys={'en_US', 'es_US', 'es_ES', 'es_AR', 'la', 'es_MX'},
                    ),
                ])),
                ('link', models.URLField()),
            ],
        ),
        migrations.CreateModel(
            name='Celebration',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('liturgical_season', models.CharField(
                    choices=[
                        ('advent', 'Advent'),
                        ('christmas', 'Christmas'),
                        ('lent', 'Lent'),
                        ('easter', 'Easter'),
                        ('ordinary', 'Ordinary Time')],
                    max_length=9,
                )),
                ('name', models.CharField(max_length=40)),
                ('antiphonas', djongo_models.ArrayReferenceField(
                    on_delete=deletion.DO_NOTHING,
                    to='antiphona.Antiphona',
                )),
            ],
        ),
    ]
