<reponame>Jordan-Kowal/django-backbone
# Generated by Django 3.1.5 on 2021-04-06 22:43

# Django
from django.db import migrations, models

# Personal
import jklib.django.db.fields
import jklib.django.db.validators


class Migration(migrations.Migration):

    initial = True

    dependencies = []

    operations = [
        migrations.CreateModel(
            name="Contact",
            fields=[
                (
                    "id",
                    models.AutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                (
                    "created_at",
                    models.DateTimeField(auto_now_add=True, verbose_name="Created at"),
                ),
                (
                    "updated_at",
                    models.DateTimeField(auto_now=True, verbose_name="Updated at"),
                ),
                (
                    "ip",
                    models.GenericIPAddressField(
                        db_index=True, verbose_name="IP Address"
                    ),
                ),
                (
                    "name",
                    jklib.django.db.fields.TrimCharField(
                        max_length=50,
                        validators=[jklib.django.db.validators.LengthValidator(3, 50)],
                        verbose_name="Name",
                    ),
                ),
                ("email", models.EmailField(max_length=254, verbose_name="Email")),
                (
                    "subject",
                    jklib.django.db.fields.TrimCharField(
                        max_length=50,
                        validators=[jklib.django.db.validators.LengthValidator(3, 50)],
                        verbose_name="Subject",
                    ),
                ),
                (
                    "body",
                    jklib.django.db.fields.TrimTextField(
                        validators=[
                            jklib.django.db.validators.LengthValidator(10, 2000)
                        ],
                        verbose_name="Body",
                    ),
                ),
            ],
            options={
                "verbose_name": "Contact",
                "verbose_name_plural": "Contacts",
                "db_table": "contacts",
                "ordering": ["-id"],
            },
        ),
    ]
