# Generated by Django 4.1.2 on 2022-11-02 22:07

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


class Migration(migrations.Migration):
    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ("character", "0032_weapon_url"),
    ]

    operations = [
        migrations.CreateModel(
            name="Party",
            fields=[
                (
                    "id",
                    models.BigAutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                (
                    "name",
                    models.CharField(max_length=100, unique=True, verbose_name="nom"),
                ),
                (
                    "created",
                    django_extensions.db.fields.CreationDateTimeField(
                        auto_now_add=True,
                        verbose_name="created",
                    ),
                ),
                (
                    "modified",
                    django_extensions.db.fields.ModificationDateTimeField(
                        auto_now=True,
                        verbose_name="modified",
                    ),
                ),
                (
                    "characters",
                    models.ManyToManyField(
                        blank=True,
                        related_name="parties",
                        to="character.character",
                        verbose_name="personnages",
                    ),
                ),
                (
                    "game_master",
                    models.ForeignKey(
                        on_delete=django.db.models.deletion.PROTECT,
                        related_name="parties",
                        to=settings.AUTH_USER_MODEL,
                        verbose_name="meneur de jeu",
                    ),
                ),
            ],
            options={
                "abstract": False,
            },
        ),
    ]
